From: Vlad S. <vl...@cr...> - 2008-10-28 17:05:57
|
After 2008-09-11, nsphp stopped working, even with the latest update to non-obsolete functions, it looks like something in the core flow, especially streaming part doe snot work properly. I tried all versions and the latest stable is marked in ChangeLog at 2008-09-11. This is only HTTP related and it could be problem in nsphp, but it was very stable until functions it used became obsolete. I started using Ns_ConnWriteData with or without NS_CONN_STREAM and browsers stopped showing web pages. These functions would tell that streaming is required and no Content-Length will be supplied: Ns_ConnSetRequiredHeaders(ctx->conn, ctype, -1); Ns_ConnFlushHeaders(ctx->conn, SG(sapi_headers).http_response_code); Then Ns_ConnWriteData without any flags would just send data to the browser In new code, the server does all things automatically but NS_CONN_STREAM flags is required to tell that we are streaming. Flush is not used anymore. When i telnet i get page back without content-length but still, every second request hangs or comes empty. |
From: Stephen D. <sd...@gm...> - 2008-10-29 19:51:03
|
On Tue, Oct 28, 2008 at 5:02 PM, Vlad Seryakov <vl...@cr...> wrote: > After 2008-09-11, nsphp stopped working, even with the latest update to > non-obsolete functions, it looks like something in the core flow, > especially streaming part doe snot work properly. > > I tried all versions and the latest stable is marked in ChangeLog at > 2008-09-11. > > This is only HTTP related and it could be problem in nsphp, but it was > very stable until functions it used became obsolete. I started using > Ns_ConnWriteData with or without NS_CONN_STREAM and browsers stopped > showing web pages. > > These functions would tell that streaming is required and no > Content-Length will be supplied: > > Ns_ConnSetRequiredHeaders(ctx->conn, ctype, -1); > Ns_ConnFlushHeaders(ctx->conn, SG(sapi_headers).http_response_code); > > Then > Ns_ConnWriteData without any flags would just send data to the browser > > In new code, the server does all things automatically but NS_CONN_STREAM > flags is required to tell that we are streaming. Flush is not used > anymore. When i telnet i get page back without content-length but still, > every second request hangs or comes empty. > I'm not sure how you're triggering this. Can you write a test and point me at it? |
From: Vlad S. <vl...@cr...> - 2008-10-30 02:02:38
|
Ok, while preparing test case i was able to pinpoint the location of the problem. I use PmWiki and it uses If-modified-Since header to return 304 responses. In new code send_headers was no-op but actually i have to call Ns_ConnWriteData with 0 length to flush headers. Now it works, it was module problem. Stephen Deasey wrote: > On Tue, Oct 28, 2008 at 5:02 PM, Vlad Seryakov <vl...@cr...> wrote: >> After 2008-09-11, nsphp stopped working, even with the latest update to >> non-obsolete functions, it looks like something in the core flow, >> especially streaming part doe snot work properly. >> >> I tried all versions and the latest stable is marked in ChangeLog at >> 2008-09-11. >> >> This is only HTTP related and it could be problem in nsphp, but it was >> very stable until functions it used became obsolete. I started using >> Ns_ConnWriteData with or without NS_CONN_STREAM and browsers stopped >> showing web pages. >> >> These functions would tell that streaming is required and no >> Content-Length will be supplied: >> >> Ns_ConnSetRequiredHeaders(ctx->conn, ctype, -1); >> Ns_ConnFlushHeaders(ctx->conn, SG(sapi_headers).http_response_code); >> >> Then >> Ns_ConnWriteData without any flags would just send data to the browser >> >> In new code, the server does all things automatically but NS_CONN_STREAM >> flags is required to tell that we are streaming. Flush is not used >> anymore. When i telnet i get page back without content-length but still, >> every second request hangs or comes empty. >> > > > I'm not sure how you're triggering this. Can you write a test and > point me at it? > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Vlad S. <vl...@cr...> - 2008-10-30 01:46:21
Attachments:
test.tgz
|
Nope, did not help in all cases. Now, it handles 304 correctly but next request to other page results in timeout and then result like this: 0 HTTP/1.1 304 Not Modified MIME-Version: 1.0 Server: NaviServer/4.99.2 Date: Thu, 30 Oct 2008 01:35:29 GMT X-Powered-By: PHP/5.2.6 Content-type: text/html Connection: keep-alive Transfer-Encoding: chunked 0 I am using PmWiki, i attached very simple and basic installation. Try to click on links and after several requests it show chunked headers. This happens after first headers flush Vlad Seryakov wrote: > Ok, while preparing test case i was able to pinpoint the location of the > problem. > I use PmWiki and it uses If-modified-Since header to return 304 > responses. In new code send_headers was no-op but actually i have to > call Ns_ConnWriteData with 0 length to flush headers. > > Now it works, it was module problem. > > Stephen Deasey wrote: >> On Tue, Oct 28, 2008 at 5:02 PM, Vlad Seryakov >> <vl...@cr...> wrote: >>> After 2008-09-11, nsphp stopped working, even with the latest update to >>> non-obsolete functions, it looks like something in the core flow, >>> especially streaming part doe snot work properly. >>> >>> I tried all versions and the latest stable is marked in ChangeLog at >>> 2008-09-11. >>> >>> This is only HTTP related and it could be problem in nsphp, but it was >>> very stable until functions it used became obsolete. I started using >>> Ns_ConnWriteData with or without NS_CONN_STREAM and browsers stopped >>> showing web pages. >>> >>> These functions would tell that streaming is required and no >>> Content-Length will be supplied: >>> >>> Ns_ConnSetRequiredHeaders(ctx->conn, ctype, -1); >>> Ns_ConnFlushHeaders(ctx->conn, SG(sapi_headers).http_response_code); >>> >>> Then >>> Ns_ConnWriteData without any flags would just send data to the browser >>> >>> In new code, the server does all things automatically but NS_CONN_STREAM >>> flags is required to tell that we are streaming. Flush is not used >>> anymore. When i telnet i get page back without content-length but still, >>> every second request hangs or comes empty. >>> >> >> >> I'm not sure how you're triggering this. Can you write a test and >> point me at it? >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> naviserver-devel mailing list >> nav...@li... >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> > |