Closed Bug 47936 Opened 24 years ago Closed 24 years ago

Large http posts (> 10K) fail

Categories

(Core :: Networking, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mscott, Assigned: ruslan)

References

Details

(Whiteboard: [nsbeta3+] [dogfood+])

Attachments

(11 files)

This problem has been around for a long time. Shame on me for not filing it
until now.

If you try to perform an http post for documents that are somewhat large, we fail.

I run into this most often posting a patch to bugzilla as an attachment. I
routinely have attachments (in the form of text patches) that are around 10-14K.
They always fail.

4.7 will post the file to bugzilla but we can't =(.
eric: You had been looking at something similar a while back (right?) I can't
seem to remember the bug number. But I agree that this needs to be addressed for
nsbeta3. 
Assignee: gagan → ruslan
Keywords: nsbeta3
Summary: Large http posts (> 10K) fail → Large http posts (> 10K) fail
Whiteboard: [nsbeta3+]
I think this is yours :-)
Assignee: ruslan → gagan
no this was deligated! :) u have been volunteered!

On a serious note, I do need to balance the load across the team and for HTTP
there is no better help than you! So could you be so kind to take this bug,
please? Thank you!
Assignee: gagan → ruslan
Ok. Presently it doesn't work at all due to the fact that 
nsHTTPEncodeStream::ReadSegments is not implemented. Must be Warren's changes. 
Warren?
Hmm. After fixing encode streams it seems like a socket transport buffer is 
busted again .... I fixed this already a long time ago. Must be a regression. 
Weird. Keep on looking.
Status: NEW → ASSIGNED
*** Bug 46498 has been marked as a duplicate of this bug. ***
A dup of this bug was recently marked dogfood+, transferring status to this bug.
Keywords: dogfood
Whiteboard: [nsbeta3+] → [nsbeta3+] [dogfood+]
Attached file test
Ok. This is definitely a regression in a webshell or elsewhere cuz the straam 
supplied to AsyncWrite doesn't behave correctly. If our streams were less 
complicated the life would have been much easier. I can always fix it via the 
old way of doing things via transfer buffer in nsSocketStream, unless Gagan 
wants to take another look.
done
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Attached patch testSplinter Review
Attached image test
Attached file test - small html
Ruslan, I've tried to post a 28k text file and an 18k html file and neither will
post. When I click on the submit button, nothing happens. Smaller files post
fine. I'm using the mozilla build from 8/28 on WinNT.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Hmm. I did test it with 40K+ file ...
I cannot repeat the last test using todays mozilla build.  For some reason I 
cannot post the 18k attachment
Ok. There's another regression here: here's the guilty code around line 1261:

  if ((NS_SUCCEEDED(rv) && (0 == totalBytesWritten)) ||         // eof, or
      (GetFlag(eSocketWrite_Async) && (0 == mWriteCount))) {    // wrote 
everything
    mSelectFlags &= (~PR_POLL_WRITE);
    rv = NS_OK;
  }

the problem is that when we write from file - mWriteCount is always zero, cuz we 
don't know the length in advance. If PR_Write retruns would_block for whatever 
reason (that's why it's hard to reproduce this bug while debugging the code) - 
it will bail out of loop and hit this check - which is bogus. Simply removing it 
will break people who use AsyncWrite with write count argument (I don't know if 
we have any, but we may). Gagan - can you look into it (looks like old rpotts 
code) and think of what's the right fix is for this so we don't break anybody?
cc'ing rpotts
Attached file Bit attachment
Fixed now. Tom, verify please
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Attached file test attach
verif:
Win NT 2000090708
Status: RESOLVED → VERIFIED
Note: bug 54081 may be a regression due to the fix for this bug - or something
else entirely.  Data is being corrupted on upload, at an offset just a little
larger than the test file that was being used for verifying the fix to this bug.

Anyone who was involved in this bug (and is on this CC list) may want to look at
bug 54081.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: