Commit Graph

69 Commits

Author SHA1 Message Date
Araq
f4bfa076ae updated httpclient to use tables.getOrDefault 2015-10-14 00:41:04 +02:00
Adam Strzelecki
be991ed413 Rename rawsockets module to nativesockets
This change was done to avoid confusion with TCP/IP raw sockets. Native sockets
module represents handling native system low level socket API in general and is
not just limited anyhow to TCP/IP raw sockets.

A stub lib/deprecated/pure/rawsockets.nim module has been added as
compatibility layer for old code using rawsockets, so this change will not
break existing code.
2015-10-03 19:45:41 +02:00
Doran
619ab0bcf0 Include port in host header as expected 2015-09-04 16:10:32 -04:00
jonathonf
9dde0ae3ac Set correct Host in request header
Ensure the correct destination hostname is used in the request, otherwise the request will fail in one of a number of interesting ways when using a proxy.

Fixes https://github.com/nim-lang/Nim/issues/3166
2015-08-01 20:53:37 +01:00
def
e264fa24cd Fix async httpclient post to work without multipart 2015-07-10 00:32:39 +02:00
Bruce Doan
02402d3ffd Implement async post request 2015-07-02 03:07:01 +07:00
Dominik Picheta
c4009c6182 Fixes #2884
Haven't tested this patch but should work.
2015-06-08 23:10:50 +01:00
pdw
cb6f867495 Fixed 'milliseconds' spelling in code and docs 2015-05-15 20:15:12 -05:00
Oleh Prypin
32109a7867 Don't run non-test code when defined(testing) 2015-04-21 14:37:29 +03:00
def
64903e7050 Use ^ instead of - in slices 2015-03-28 00:38:15 +01:00
Dominik Picheta
bab8190b67 Fixes bugs introduced by ee62d56cad. Closes #2227. 2015-03-05 21:18:28 +00:00
Federico Ceratto
657dca5c3b Fix typos 2015-02-15 16:20:32 +00:00
Varriount
0e65df4bbf Added documentation for the new http request procedures. 2015-01-23 22:06:57 -05:00
Varriount
38b7fb94ef Fixes #1962 2015-01-22 16:45:18 -05:00
def
f2c1b3be13 Fix body in httpclient
- Never append a newline to the body in a HTTP post.
- Pass the entire body to redirections, including multipart data
2015-01-13 18:48:49 +01:00
def
9cf948e0c8 Rename newData() to newMultipartData() 2015-01-05 18:29:17 +01:00
def
e77eec02f3 A few more fixes to httpclient multipart 2015-01-05 01:58:39 +01:00
def
d4955090ae post should work when extra headers don't have trailing newline 2015-01-05 01:55:52 +01:00
def
a90c388f6b Check that p is not nil in format 2015-01-05 01:40:47 +01:00
def
38392d2d03 Add multipart parameter to httpclient's post and postContent 2015-01-05 00:14:53 +01:00
def
c7fac03abe Remove debug messages 2015-01-03 21:53:40 +01:00
def
ee62d56cad Apply #1824 to fix #1823 2015-01-03 17:44:30 +01:00
def
387d598cfb Minor cleanup 2015-01-03 17:40:33 +01:00
def
dd82f0c829 Fix httpclient to properly encode queries (path?queries) 2015-01-03 17:21:54 +01:00
Dominik Picheta
e6245674f2 Fixes #1759.
Caused by not skipping the \c\l with Chunked encoding after the body is parsed.
2014-12-21 22:41:13 +00:00
Will Szumski
2b854849ca removed unused variable from httpclient 2014-12-17 18:51:37 +00:00
Will Szumski
3cfc8877f6 replace deprecated parseUrl with parseUri in httpclient 2014-12-17 18:16:33 +00:00
Will Szumski
7a7fe85f85 switched httpclient to use net module instead of sockets 2014-12-17 17:53:11 +00:00
def
f52fd8785f Fix some deprecation warnings caused by renames 2014-11-13 21:34:46 +01:00
Erik O'Leary
f31c62315f Made 'headers' public 2014-11-06 18:41:21 -06:00
Dominik Picheta
6f155af802 Lots of documentation improvements for asyncdispatch.
Ref #1487.
2014-09-12 22:54:02 +01:00
Dominik Picheta
bd542ebea3 Fixes httpclient SSL issue. Implements unbuffered SSL recv. Ref #1487. 2014-09-06 15:29:38 +01:00
Dominik Picheta
bb1e87ce4d Async SSL support. 2014-08-31 12:55:04 +01:00
Dominik Picheta
d26d42b88e Case sensitivity fixes for httpclient and sockets module. 2014-08-31 12:55:03 +01:00
Dominik Picheta
361657dea4 Merge branch 'devel' into bigbreak
Conflicts:
	lib/pure/ftpclient.nim
2014-08-30 11:58:54 +01:00
Dominik Picheta
3a00692ef8 Add asyncftpclient module. 2014-08-29 22:44:05 +01:00
Araq
4523b29d7a Nimrod renamed to Nim 2014-08-28 09:59:26 +02:00
Araq
11b6958755 big rename 2014-08-27 23:42:51 +02:00
Dominik Picheta
374706b1c3 Void futures are no longer discardable. 2014-07-13 10:19:48 +01:00
Dominik Picheta
941cc937d3 Fixes docgen. 2014-04-15 22:09:12 +01:00
Dominik Picheta
21d0cc8cdf Add checks for invalid socket when creating sockets. 2014-04-15 13:51:25 +01:00
Dominik Picheta
d2593e1d62 setLen now used on asyncdispatch.recv's return value on Linux.
This fixes issues with the async httpclient.
2014-04-06 22:06:25 +01:00
Dominik Picheta
439569cfa3 Documentation for async httpclient. Notes for url modules. 2014-04-06 19:27:16 +01:00
Dominik Picheta
d0478a5637 Asyncdispatch fixes.
``return`` is now transformed into a ``return nil`` in the async iterator
to work around the no-yield in ``try .. except ..`` closure iterator
limitation.
2014-04-05 20:27:42 +01:00
Dominik Picheta
5a4afbef84 Proper handling of disconnections during reading in httpclient. 2014-04-03 20:06:59 +01:00
Dominik Picheta
4399895d2e Async httpclient should now work. Changed recv behaviour.
asyncdispatch.recv no longer guarantees that it will read ALL the data
requested. The underlying WinAPI function doesn't guarantee this and it
already wasn't guaranteed anyway since the socket could disconnect
mid-transmission.
2014-04-03 20:02:42 +01:00
Dominik Picheta
e4e87f1cb2 Refactored createCb in asyncdispatch. 2014-04-02 21:28:45 +01:00
Dominik Picheta
783087fd57 Implemented async for httpclient. 2014-03-26 16:43:32 +00:00
Michał Zieliński
0420c8c363 httpclient: strip trailing whitespace from headers.
- we can do that according to the RFC.
- fixes #783
2013-12-28 17:26:08 +01:00
Dominik Picheta
c934a33ccd Implemented ability to connect through proxies for the httpclient module. 2013-08-26 18:02:45 +01:00