On Dec 19, 2008, at 2:55 AM, Илья Казначеев wrote:

> Hello *!
>
> For some reason, Resin 3.1, when responding with 304 due to
> sendError(SC_NOT_MODIFIED), is going to reply with the header
> Content-Length = zero:
>
> And, in fact, it broke our mod_accel, which responded to client with  
> 200 OK,
> Content-Length: 0, following with full body ....JFIF...., and was  
> very surprised when
> client dropped connection.
>
> I understand that using mod_accel == DINOSAUR! in 2008, but still,  
> why does resin
> do that? There's a special section in resin/src/com/caucho/server/ 
> http/HttpResponse.java
> line 365:
>    else if (statusCode == SC_NOT_MODIFIED || statusCode ==  
> SC_NO_CONTENT) {
>      hasContentLength = true;
>      os.write(_contentLengthBytes, 0, _contentLengthBytes.length);
>      os.print(0);
>
>      if (debug)
>        log.fine(_request.dbgId() + "Content-Length: 0");
>    }
> After I've commented that, front-end ceased malfunction and we  
> didn't see the problem.
>
> Still, is there a reason the above code is included? Maybe there's a  
> useful client which
> fails to work properly when it see 304 without content-length? Or  
> it's just a rudiment and
> can be removed?

I've removed that in the 4.0 tree.  It was added as part of a bug  
report for some clients that needed the content-length: 0.

-- Scott

>
>
> Thanks for suggestions!
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to