Anonymous avatar Anonymous committed 5590e47 Merge

Merged from main branch

Comments (0)

Files changed (2)

+Version ?:
+* Fix for decoding chunked HTTP responses with extraneous whitespace
+  (thanks to Bob Ippolito) 
+    * api.facebook.com includes extra whitespace in its chunked HTTP response
+      length, e.g. "6  \r\n" instead of "6\r\n". 
+* Fix for unexpected messages after request has been completed
+    * When the client process is trapping exits (which some eunit versions seem
+      to be doing by default) there would be {'EXIT', Pid, normal} messages left
+      after completing requests which came from the lhttpc_client process.
+      These are now avoided.
+
 Version 1.2.1:
 * Fix confusion of arguments in request/9 (introduced in 1.2.0)
 
 Version 1.2.0:
 * Add support for options
-    * {connect_timeout, Milliseconds}: Aborts the connect phase after Milliseconds
-    * {send_retry, N}: The client will retry sending the request N times if the connection is closed
+    * {connect_timeout, Milliseconds}: Aborts the connect phase after
+      Milliseconds
+    * {send_retry, N}: The client will retry sending the request N times
+      if the connection is closed
 * Add support for downloading chunked transfer encoding
 * More consistent error handling
-    * The client can either return {ok, Result} or {error, Reason}. Reason wasn't very well defined before
-        * connection_closed: The server closed the connection on us (N times in case it happens just after sending the request) 
-        * connect_timeout: If the TCP stack gives up or we hit the connect_timeout option
+    * The client can either return {ok, Result} or {error, Reason}. Reason
+      (which wasn't very well defined before) can now be:
+        * connection_closed: The server closed the connection on us (N times
+          in case it happens just after sending the request) 
+        * connect_timeout: If the TCP stack gives up or we hit the
+          connect_timeout option
         * timeout: If the overall request timeout value is hit
     * All other errors (socket, protocol etc. will result in a runtime error)
 * Better connection handling (issues #2 and #3 on bitbucket.org/etc/lhttpc)
     * Now respects "Connection: close" in request headers, which means
       clients can choose to not use persistent connections
 * RFC Compliance
-    * Fix reading of chunked encoding since section 3.6 claims that "All transfer-coding values are case-insensitive"
-    * Support for responses that doesn't have an entity body (thanks to Steve Ellis)
-        * No body for the HEAD and OPTIONS (unless indicated for the latter) methods
+    * Fix reading of chunked encoding since section 3.6 claims that "All
+      transfer-coding values are case-insensitive"
+    * Support for responses that doesn't have an entity body (thanks to Steve
+      Ellis)
+        * No body for the HEAD and OPTIONS (unless indicated for the latter)
+          methods
         * Don't try to read a body when receiving a 204 status
 
 Version 1.1.2:
 * Fix minor error with {active, once} instead of {active, true} in manager
-* Remove socket and try to find another if the manager can't set controlling process due to socket error
+* Remove socket and try to find another if the manager can't set controlling
+  process due to socket error
 * Improve test suite 
 
 Version 1.1.1:

src/lhttpc_client.erl

     Chars;
 chunk_size(<<"\r\n", _/binary>>, Chars) ->
     Chars;
+chunk_size(<<$\s, Binary/binary>>, Chars) ->
+    %% Facebook's HTTP server returns a chunk size like "6  \r\n"
+    chunk_size(Binary, Chars);
 chunk_size(<<Char, Binary/binary>>, Chars) ->
     chunk_size(Binary, [Char | Chars]).
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.