Bizarre PUT behavior (2.0.47)

This is a discussion on Bizarre PUT behavior (2.0.47) within the Apache Web Server forums, part of the Web Server and Related Forums category; My Java middleware server publishes binary files to my Apache Web server via the PUT method. I'm using a ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-11-2003
Tim Wood
 
Posts: n/a
Default Bizarre PUT behavior (2.0.47)

My Java middleware server publishes binary files to my Apache Web server
via the PUT method. I'm using a native Apache PUT module from gknw.net
(mod_put), which I can build and configure into the server successfully.

The Java server connects to the Apache server, and uploads the file with
the name and size expected. But uploading the same file multiple times
(with distinct names) results in each file having different content (but
all the same size as the original)! And none of the result files matches
the original file! AFAIK, Apache is not using any input filters. I have
tapped the data from within the PUT module code before Apache saves it, and
verified that the corruption has occurred at that point (by writing it
using vanilla creat/write/close calls to a temp file).

Places left to look are the Apache ap_get_client_block() routine and the
handling of the data on the Java side. The Apache call is simple because I
send Content-length with the PUT rather than chunking, so I don't think
it's doing anything to the data. The Java call is a question; I use
HttpURLConnection to connect to Apache. The OutputStream object is a
sun.net.www.http.PosterOutputStream. I wonder if that is somehow
transforming the binary data, and how I would suppress that.

Thanks in advance,
TW


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
  #2 (permalink)  
Old 11-11-2003
Tim Wood
 
Posts: n/a
Default Re: SOLVED Bizarre PUT behavior (2.0.47)

On Tue, 11 Nov 2003 01:42:47 GMT, Tim Wood <timwood0spamx@pacbell.net>
wrote:


> The Java server connects to the Apache server, and uploads the file with
> the name and size expected. But uploading the same file multiple times
> (with distinct names) results in each file having different content (but
> all the same size as the original)! And none of the result files matches
> the original file!


This problem confounded me because I had lifted the code from a standalone
test case which worked, into the server which didn't. THE DIFFERENCE being
that the test code assembled the input directly from database result rows,
whereas the server was first dropping those rows into a (randomly ordered)
HashSet. Explains why the result file was different each time. So now the
server drops the rows into an ordered set (a List) before passing the data
back up to the Apache comm. level.

Thanks to all for any thinking to this point.
TW
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:30 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0