<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Untitled</TITLE>
</HEAD>
<BODY>
<a HREF="http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3839353138393a33303639373a2d323a313933"><!-- RS-STRIP-BEGIN MTk2LjMwLjc5LjE1NQ== --><IMG SRC="cid:MGJQsZCmm6CSPSgK0/eY1g==" alt="Look 4 Help - Click here for more info" border=0><!-- RS-STRIP-END MTk2LjMwLjc5LjE1NQ== --></a><br>
<a HREF="http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3839353138393a33303639373a2d323a313836"><!-- RS-STRIP-BEGIN MTk2LjMwLjc5LjE1NQ== --><IMG SRC="cid:VWO+hBcmxEzWxqZeFhRAFQ==" alt=" " border=0><!-- RS-STRIP-END MTk2LjMwLjc5LjE1NQ== --></a>
<p>
It looks like I have managed to fix the problem with the 100 Continue<br>response lines<br><br>It's a bit messy and I certainly wouldn't recommend any one else use it<br>until the powers that be ok'd it.<br><br>I am only going to post the bits I changed<br><br>The idea is that if the "100 Continue" response is recognised, the Body<br>is re-parsed from scratch. I am not sure if all the extra response<br>handling in the parsing case is neccesary.<br>I also don't know if the behavior of the header "expect=100-continue"<br>will stil be correct.<br><br>-]-[einrich<br><br><br>-- httpc_handler.erl<br><br>handle_response(State = #state{request = Request = #request{id = ID,<br> from =<br>Client},<br> session = Session, <br> status_line = StatusLine,<br> headers = Headers, body = Body}) -><br> <br> case lists:member(ID, State#state.canceled) of<br> true -><br> handle_pipeline(<br> State#state{canceled = lists:delete(ID, <br> <br>State#state.canceled)});<br> false -><br> case http_response:result({StatusLine, Headers, Body}, <br> Request, Session) of<br> {ok, ""} -> % redirect<br> handle_pipeline(State);<br> %% Added this<br> {ok, continue} -><br> <br> {Module, Function, Args} = {http_response, parse,<br> <br>[State#state.max_header_size]},<br> Data = State#state.body,<br> Method = (State#state.request)#request.method,<br> case Module:Function([Data | Args]) of<br> {ok, Result} -><br> handle_http_msg(Result, State); <br> {_, whole_body, _} when Method == head -><br> handle_response(State#state{body = <<>>}); <br> NewMFA -><br> <br>http_transport:setopts(Session#tcp_session.scheme, <br> <br>Session#tcp_session.socket, <br> [{active, once}]),<br> {noreply, State#state{mfa = NewMFA}}<br> end;<br> %% End addition<br> {ok, Msg} -><br> http_response:send(Client, Msg),<br> handle_pipeline(State);<br> {stop, Msg} -><br> http_response:send(Client, Msg),<br> {stop, normal, State}<br> end<br> end.<br><br>-- http_response.erl<br><br>%%% RFC2616, Section 10.1.1<br>%%% Note:<br>%%% - Only act on the 100 status if the request included the<br>%%% "Expect:100-continue" header, otherwise just ignore this response.<br>status_continue(Req = #http_request_h{expect="100-continue"}, Session)<br>-><br> {_, Body} = Req#request.content,<br> http_transport:send(Session#tcp_session.scheme, <br> Session#tcp_session.socket, Body),<br> {ok, continue};<br><br>status_continue(_Req, _Session) -><br> error_logger:info_msg("Found Continue"),<br> {ok, continue}.<br><br>
</p>
<a href="http://www.rocketseed.com/discstart.html"><br></a>
<p></p>
<a href="http://www.rocketseed.com/discend.html"><br></a></p></BODY></HTML>