Henri,

A few more problems:  

 1) Take a look at ll. 592-600.  In case of a POST request, this will
overwrite the initial buffer (imsg) with the POST data.  If TC is then
restarted, and that request is resent, it will be garbage (POST data instead
of request data).

How best to fix this?  I would say, pass in *both* buffers to send_request
function.  I might call them request_msg and data_msg.  Use request_msg up
to l 592, and then, if there is extra data, send it over in data_msg.

Will this be fully restartable?  I'm not absolutely sure -- it all depends
on whether or not we can reread the POST data from Apache after a restart
(actually, from *all* of the servers supported by mod_jk).  This depends on
the read() function of the web_server_service object -- look in mod_jk.c ll.
219-241.  I don't know the Apache API well enough to understand how this
would work if called more than once for the POST data.  To fully support the
other web servers, we'd have to understand if the read() method allowed
rereading the initial data.


 2) is_recoverable_error is passed into send_request, and it's value is
assigned to, but it is in no way checked/used.  Was this also true of the
old jk_ajp13 code?  (I believe so, but I'm not sure).  If it's genuinely not
being used, we should remove it, but I would like to understand what it
should be doing, and make sure we're not missing an error state somewhere. 


 3) Log message errors:

l. 639 Should be "Error reading reply", I think.

l. 663 should be "Error sending request data", I think.


 4) Still using 4-space tabs.  A quick look through some of the other C
classes suggests that most of them don't use tabs at all (just spaces). 
Let's try to emulate that -- I'll try to stop using 8-space tabs.

-Dan

GOMEZ Henri wrote:
> 
> Oups not the up to date code.
> 
> Find attached the correct patch. It will correctly
> handle the tomcat failure (when restarted or down)
> during upload mode ....
> 
> >-----Original Message-----
> >From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, March 20, 2001 1:40 PM
> >To: [EMAIL PROTECTED]
> >Cc: Dan Milstein (E-mail); Keith Wannamaker (E-mail)
> >Subject: ajp13 restart patch - next step
> >
> >
> >Hi,
> >
> >You could find attached the latest patch for mod_jk
> >ajp13_worker.
> >
> >The imsg buf stand now for initial msg. I fixed the naming.
> >
> >Thanks to comments before I commit it.
> >
> >
> >
> >
> >
> >
> 
>   ----------------------------------------------------------------------------
>                              Name: jk_ajp13_worker.c.diff
>    jk_ajp13_worker.c.diff    Type: unspecified type (application/octet-stream)
>                          Encoding: quoted-printable

-- 

Dan Milstein // [EMAIL PROTECTED]

Reply via email to