Thijs Schreijer
Thijs Schreijer
Additional modifications; I updated the `create` function to be a method call. For the http module this means that the `create` function can check its context and be aware of...
This PR is the basis for a LuaSec fix (https://github.com/brunoos/luasec/issues/38) to allow redirects from http to https and vice versa. That PR uses the `create` function as a method call...
Here's yet another request caused by the failure to detect redirects; https://github.com/brunoos/luasec/issues/57#issuecomment-152340735
@Babbleshack for now you could use copas, it has utility functions for http and https, including cross scheme redirects. see http://keplerproject.github.io/copas/manual.html#highlevel
Looks good to me :+1: On the naming; `genericform` is not very descriptive. Something with `parse` in it would be better imo.
What would "supported" mean in that case? So if I do a request with `{ http = true, https = true }`, what would LuaSocket do if the scheme turns...
Not sure we're on the same page here. The changes I made pass the request table to the `create` function. Once called, the function can check its context and adjust...
> I understand that it is possible for the create method to look at the request table and make modifications so it works with https. (We'd need to fix adjust...
Can't we use an illegal character; eg `_default` for example?
This seems to work: ```lua local socket = require "socket" local server = assert(socket.tcp()) server:settimeout(60) assert(server:bind("*", 14123)) -- switch position between 'bind' and 'setoption' assert(server:setoption("reuseaddr", true)) ```