HTTPS support in lwip

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: HTTP keep alive SSI

wilkxt

Hi Tomek,

are you aware of email threads and that you just hijacked another thread?
Never use the "reply" feature unless actually responding to a mail!

ok, my mistake
 
"tomek wilkxt" wrote:
> Hi
> I read this form "httpd_opts.h" file :
> " * A downside of the current SSI implementation is that persistent connections
>  * don't work, as the file length is not known in advance (and httpd currently
>  * relies on the Content-Length header for persistent connections).
>  *
>  
> Do you have a way to solve this problem? I need a permanent connection for xml.json.

You could use a form of HTTP chunked encoding, 

You could explain more precisely ?
 
Instead, I used custom files to create such JSON files (not using SSI). Your
custom file handler code can then set these files to have a length so that
a persistent connection is not a problem.

But, how create dynamically json/xml file with variable without SSI?


thanks for replay


--
regards
tomek

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: HTTP keep alive SSI

goldsimon@gmx.de
Am 06.09.2019 um 19:05 schrieb tomek wilkxt:
>
>     Hi Tomek,
>
>     are you aware of email threads and that you just hijacked another
>     thread?
>     Never use the "reply" feature unless actually responding to a mail!
>
>
> ok, my mistake

And please, send text-only mails when sending mails to mailing lists!
Thanks!

>
>     "tomek wilkxt" wrote:
>      > Hi
>      > I read this form "httpd_opts.h" file :
>      > " * A downside of the current SSI implementation is that
>     persistent connections
>      >  * don't work, as the file length is not known in advance (and
>     httpd currently
>      >  * relies on the Content-Length header for persistent connections).
>      >  *
>      >
>      > Do you have a way to solve this problem? I need a permanent
>     connection for xml.json.
>
>     You could use a form of HTTP chunked encoding,
>
>
> You could explain more precisely ?

Not in detail, that would get too long here. Just google for "http
chunked encoding". Basically, you don't send a content length for the
whole response in advance, but you encode the content length in the body
(there are different types of encoding it). Thus the client can know
when the response is finished (without sending FIN).

>
>     Instead, I used custom files to create such JSON files (not using
>     SSI). Your
>     custom file handler code can then set these files to have a length
>     so that
>     a persistent connection is not a problem.
>
>
> But, how create dynamically json/xml file with variable without SSI?

Have a look at this example in our sources:
http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/httpd/genfiles_example/genfiles_example.c

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: HTTP keep alive SSI

wilkxt
> >     You could use a form of HTTP chunked encoding,
> >
> >
> > You could explain more precisely ?
>
> Not in detail, that would get too long here. Just google for "http
> chunked encoding". Basically, you don't send a content length for the
> whole response in advance, but you encode the content length in the body
> (there are different types of encoding it). Thus the client can know
> when the response is finished (without sending FIN).

Ok, but essential question is whether length  is necessary for a
permanent connection?


> > But, how create dynamically json/xml file with variable without SSI?
>
> Have a look at this example in our sources:
> http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/httpd/genfiles_example/genfiles_example.c

Ok, thanks


--
regards
tomek

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: HTTP keep alive SSI

goldsimon@gmx.de
Am 06.09.2019 um 19:39 schrieb tomek wilkxt:

>>>      You could use a form of HTTP chunked encoding,
>>>
>>>
>>> You could explain more precisely ?
>>
>> Not in detail, that would get too long here. Just google for "http
>> chunked encoding". Basically, you don't send a content length for the
>> whole response in advance, but you encode the content length in the body
>> (there are different types of encoding it). Thus the client can know
>> when the response is finished (without sending FIN).
>
> Ok, but essential question is whether length  is necessary for a
> permanent connection?

Well, no. That's what I meant to explain. You either need content-length
or chunked encoding. Otherwise, the client cannot know when the transfer
is finished and needs a FIN for that.

If I'm not mistaken, there's a form of chunked encoding that can do
without length, but I haven't really digged into that at all.

Regards,
Simon

>
>
>>> But, how create dynamically json/xml file with variable without SSI?
>>
>> Have a look at this example in our sources:
>> http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/httpd/genfiles_example/genfiles_example.c
>
> Ok, thanks
>
>


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
12