Commit graph

8 commits

Author SHA1 Message Date
Simon Duquennoy 8cdff8c21b Merge pull request #1696 from momote-io/fixes
fix ipv6 http socket host handling as in RFC2732
2016-06-05 12:46:59 +02:00
Marco Casaroli 47df9c4e6e code style 2016-06-04 16:47:52 -03:00
Marco Casaroli 19e08de0e2 use memchr instead of strchr for checking if host is ipv6 2016-06-03 12:12:24 -03:00
Marco Casaroli e657ca40e9 return error if host does not fit in host string 2016-06-03 12:11:51 -03:00
Marco Casaroli 03ca795bd6 fix ipv6 http socket host handling as in RFC2732 2016-06-01 09:26:12 -03:00
Mark Solters 65632cb086 Fix IPv6 HTTP URL parsing
Currently, http-socket uses a `parse_url` method which only works correctly with IPv4 hosts (e.g. `http://192.168.1.1:3000`).  When using an IPv6 host (e.g. `http://[abcd::1]:3000`), the port number is not parsed due to a pointer increment error, which leads to the algorithm assuming a default port of 80 even when the user code has specified otherwise.  This fix provides full URL parsing for IPv6 hosts, and does not break IPv4 functionality.
2016-05-26 22:42:53 -04:00
Adam Dunkels c06e6ae74d Explicitly use the IPv6 address copy macro when copying IPv6 addresses 2015-05-10 10:51:12 +02:00
Adam Dunkels 33372945a3 HTTP socket code with support for GET and POST 2015-05-10 10:51:11 +02:00