Commit Graph

32 Commits

Author SHA1 Message Date
djazz
1168c75381 httpcore: Add http code 308 Permanent Redirect (#14639)
* httpcore: Add http code 308
* httpclient: Add 308 to redirection proc
* fix typo
2020-06-12 10:16:38 +02:00
wonderix
5571d48c32 Add the ability to pass title case headers to an HTTP server (#13968)
* Add the ability to pass title case headers to an HTTP server

* Remove unnecessary type spec of titleCase

* Replace convert member proc by isTitleCase

Co-authored-by: wonderix <wonderix@googlemail.com>
2020-04-22 17:43:39 +02:00
alaviss
b33335d7fd httpcore: deprecate ==(string, HttpCode) (#13682)
According to [RFC7230], the reason phrase attached to the status line is
optional and clients should not rely on it. This in turn causes the proc
to be practically useless, as clients should only inspect the return
code.

Ref #13680.

[RFC7230]: https://tools.ietf.org/html/rfc7230#section-3.1.2
2020-03-19 09:07:44 +01:00
Zed
e056298ceb Implement file streaming for httpclient's MultipartData (#12982)
* Add `uploadFile` to POST files by streaming them

* Use constant for \c\L

* Formatting

* Remove uploadFile

* Implement MultipartData file streaming

* Remove unnecessary var annotations

* Call string on TaintedStrings

Fixes #12789

* Move cl constant to httpcore

* Fix `request` inconsistencies

* Update documentaion

* Clean up

* Skip multipart formatting when there's 0 entries

* Remove extraneous `cl` from multipart formatting

* Update MultipartData `$` to match old behaviour

* Update comment

* Address comments
2020-03-06 18:55:45 +00:00
Andrea Ferretti
7ae0811818 Fix #13573 and #13574 (#13575)
* Fix https://github.com/nim-lang/Nim/issues/13573 and https://github.com/nim-lang/Nim/issues/13574

* Restored asynchttpserver
2020-03-06 18:38:56 +00:00
narimiran
0ca9cc7419 [backport] run nimpretty on web stuff 2019-09-30 13:58:11 +02:00
narimiran
f7a8fc46c0 Revert "improvements for httpcore (#12228)"
This reverts commit b865c2a54b.
2019-09-23 19:06:55 +02:00
Andreas Rumpf
b865c2a54b improvements for httpcore (#12228)
* improvements for httpcore
* further improvements, now stable API but needs extensions later on
2019-09-23 12:38:35 +02:00
Araq
5abe880469 last stdlib cleanups 2019-09-21 06:43:37 +02:00
Araq
bc7733827d make more parts of the stdlib compile with --styleCheck:error 2019-07-10 15:48:30 +02:00
Araq
bbb0fd4eb7 remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
Andreas Rumpf
0fad659bf7 make more tests green 2018-04-30 02:52:58 +02:00
Dominik Picheta
bfae7bfe83 Add $ for HttpHeaders. 2017-10-20 18:24:17 +01:00
Andreas Rumpf
159643824b fixes #3847 (#5609) 2017-03-27 09:39:46 +02:00
Dominik Picheta
a336bf2395 Fixes parseHeader("foo:") != ("foo", @[""]). Refs #5344. 2017-02-13 21:14:29 +01:00
Dominik Picheta
7c15120247 Add some tests to httpcore related to #5344. 2017-02-07 18:32:57 +01:00
Federico Ceratto
74e442f766 Add HTTP header deletion, improve tests 2016-12-01 00:11:59 +00:00
Dominik Picheta
9753fb064f Add PATCH HTTP Method. 2016-09-25 11:48:10 +02:00
Dominik Picheta
26c7a76c8a asynchttpserver's Response object's req method uses HttpMethod now.
Fixes #4423.
2016-09-25 00:39:57 +02:00
Andrea Ferretti
4ee4393556 Fixed missing comma 2016-09-22 11:54:59 +02:00
Andrea Ferretti
91f6784d0f Added PATCH HTTP method 2016-09-21 17:27:05 +02:00
Dominik Picheta
09651bec5e HttpCode shouldn't require explicit initialisation to prevent breakage. 2016-09-19 21:53:07 +02:00
Dominik Picheta
31bdf45ffe Reverted removal of HttpCode.$. 2016-09-19 21:16:50 +02:00
Dominik Picheta
cfd187d16e Use distinct range for HttpCode as suggested by @nigredo-tori. 2016-09-19 20:58:27 +02:00
Dominik Picheta
8386476592 Implements proxy support for (Async)HttpClient. Ref #4423.
Fixes #2160.
2016-09-18 22:59:12 +02:00
Dominik Picheta
3ad368f8ca Improvements to httpclient. Refs #4423.
* Adds ability to query HttpCode and compare it with strings.
* Moves HttpMethod to HttpCore module.
* Implements synchronous HttpClient using {.multisync.}.
2016-09-18 18:16:51 +02:00
Araq
3a3aeb94ec minor stdlib cleanups 2016-09-09 20:41:26 +02:00
Zach Aysan
1e31b27330 Fix typo 2016-06-23 14:37:17 -04:00
Zach Aysan
280b589cd8 Add missing - yet necessary - HTTP status codes. 2016-06-23 14:23:57 -04:00
Dominik Picheta
ad91da8342 Fixes httpcore.[]= so that it doesn't convert value to lowercase. 2016-06-06 22:15:43 +01:00
Andreas Rumpf
487bf54cdf fixes #4278 2016-06-05 17:13:35 +02:00
Dominik Picheta
cc80eac84b Add missing httpcore module. 2016-06-02 20:16:25 +01:00