[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to read http PUT or POST data from luasocket server
- From: Benjamin Kober <kober@...>
- Date: Mon, 07 Oct 2013 14:49:40 +0200
Hi Orlando,
>
> HTTP is a little more complex than just receiving, as you can assert
> by skimmin through, say, RFC 2616. The request consist of the method
> line, plus some header lines, plus an empty line to signal end of
> headers, plus an optional comment.
>
> If you do a receive with a simple socket you are possibly getting only
> the first line of the request, which is APARENTLY fine for GET, as
> most of the info you need is there, but not with put or post.
>
my problem is not parsing the http response but that I get only the
first line of it. Till now I didn't found out how to read out more than
one line from the socket. It seems as if the library cuts everything
after the first newline sign.
>> Has anyone experience with this kind of requests? I didn't found
>> something in the official docs.
>
> I think this library has HTTP modules. Use one of them.
These modules where designed to write a client and not a server.
Greetings, Benjamin