/ Zope / Apsis / Pound Mailing List / Archive / 2004 / 2004-07 / Pound and ASP on IIS

[ << ] [ >> ]

[ graphics with zope and pound / "Claus ... ] [ New -current / Robert Segall ... ]

Pound and ASP on IIS
John D <jwdavid(at)ibizvision.com>
2004-07-13 03:06:02 [ FULL ]
Hello all,

I am seeing strange behavior with Pound talking to an IIS backend server (this
happens to be an ASP script).

When I make the request to the IIS server directly I see the following:
--------------------------------------------------------------------------
$ curl -i http://192.168.1.5/forum/index.asp
HTTP/1.1 302 Object moved
Server: Microsoft-IIS/5.1
Date: Tue, 13 Jul 2004 00:46:01 GMT
Location: default.asp
Content-Length: 121
Content-Type: text/html
Set-Cookie: ASPSESSIONIDQCSBCDQB=BGKDDGJBJOGDHDFFEHEIBKPA; path=/
Cache-control: private
 
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a
HREF="">here</a>.</body>
--------------------------------------------------------------------------

This looks all fine and dandy.

However, when I query the Pound server I get this:
--------------------------------------------------------------------------
$ curl -i http://192.168.1.9:8080/forum/index.asp
HTTP/1.1 302 Object moved
Server: Microsoft-IIS/5.1
Date: Tue, 13 Jul 2004 00:49:13 GMT
Location: default.asp
Content-Length: 121
Content-Type: text/html
Set-Cookie: ASPSESSIONIDQCSBCDQB=DGKDDGJBAJPDNGINIGCBGEPE; path=/
Cache-control: private
 
curl: (18) transfer closed with 121 bytes remaining to read
--------------------------------------------------------------------------

And it takes about 10 seconds for it to show that error. This is not a curl
issue, IE, FireFox and Mozilla all show this delay, so I assume the same thing
is happening. Pound is apparently chopping off the Data on a 302 status, but
not modifying the Content-Length.

I have searched the list and don't see anything about this particular issue.
The only thing was a reference to a 304 error with similar symptoms.

This was Pound-current downloaded and compiled today. The Config is very small,
it Listens on the ip and has one URLGroup that sends everything to the IIS
server.

Any insight into this matter would be helpfull.

Thanks;

John D.

Re: Pound and ASP on IIS
Robert Segall <roseg(at)apsis.ch>
2004-07-13 14:53:02 [ FULL ]
On Tuesday 13 July 2004 03.06, John D wrote:[...]

It is assumed that 302 responses have no content. If your server actually does 
that you can modify pound easily: change line 405 in pound.c to read

|| regcomp(&RESP_IGN, "^HTTP/1.[01] (10[1-9]|1[1-9][0-9]|204|30[1347]).*$",

REG_ICASE | REG_NEWLINE | REG_EXTENDED)

and 302 responses will allow content.

Hope this helps...[...]

RE: Pound and ASP on IIS
John D <jwdavid(at)ibizvision.com>
2004-07-13 16:47:55 [ FULL ]
Robert,

Thanks for your help.

On the Pound-current I have (which is the most recent one on the site), it was
actually on line 402. In any case, once I made the change, it did allow the
data to pass through.

However, this leads me to three questions: Is it correct to assume that this
status (as well as all the other that RegEx matches) are not supposed to have
any content (I am not that familiar with the RFCs so I don't know the answer to
this)? If so, wouldn't it be better to leave the RegEx alone and change to code
to modify the Content-Length header to reflect the fact that there is no
content? Or maybe it is best not to ignore based on status at all and only
ignore the content if the Content-Length indicates there is nothing? 

Thank you very much for your help. Pound is a great product, and I only ask
these questions to possibly help make future versions even better.

John D.

********** Original Email *********
** To:   pound(at)apsis.ch
** From: Robert Segall <roseg(at)apsis.ch>
** Date: Tue, 13 Jul 2004 14:53:02 +0200
**********

On Tuesday 13 July 2004 03.06, John D wrote:[...]

It is assumed that 302 responses have no content. If your server actually does 
that you can modify pound easily: change line 405 in pound.c to read

|| regcomp(&RESP_IGN, "^HTTP/1.[01] (10[1-9]|1[1-9][0-9]|204|30[1347]).*$",

REG_ICASE | REG_NEWLINE | REG_EXTENDED)

and 302 responses will allow content.

Hope this helps...[...]

Re: Pound and ASP on IIS
Robert Segall <roseg(at)apsis.ch>
2004-07-13 17:55:46 [ FULL ]
On Tuesday 13 July 2004 16.47, John D wrote:[...]

Right - I was working off a not yet released -current-to-come. My mistake...
[...]

Opinions are divided on the understanding of 30x codes - actually even the RFC 
admits that it might not conform (see for example the relevant sections in 
RFC 2616).

To make matters worse: in some circumstances (such as 304 Not Modified) having 
a Content-length does not indicate that there is any actual content...
[...]

It was taken in that spirit.[...]

MailBoxer