Ticket #807 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

RegisterHttpCallback sock issue

Reported by: sjs25 Owned by: yemuru
Priority: major Milestone:
Component: - Version: 0.1o
Severity: Medium Keywords: Sock, ReigsterHttpCallback
Cc: Blocking:
Blocked By:

Description

In the following code (around line 532), sometimes all of the data that needs to be sent isn't sent. There is no garuntee that the entire string in variable 'webpage_content' will be passed. This code should loop and check to see whether the whole file was passed to the sock.

try:

sock.send(httpheader)
sock.send(webpage_content)
sock.close()

except Exception, e:

raise HttpConnectionError?('server failed to send the http content ' + str(e))

Change History

Changed 10 years ago by yemuru

  • status changed from new to closed
  • resolution set to fixed

Fixed new update available in seattle lib trunk.

Changed 10 years ago by jsamuel

  • status changed from closed to reopened
  • resolution fixed deleted

I don't think this is fixed. How were you able to fix it without knowing how much was ever actually sent?

Also, I don't understand the chunk_size concept. Why did you choose 1024 bytes? Is that the minimum number that always gets sent according to the Repy API? Please comment the reason for choosing such a number.

Please take a look at RepyLibrary and the details of the socket.send() function and feel free to ask for help if you're not sure how to solve this (you can post questions here in the ticket if you want).

Also, please always reference the revision number when closing a ticket and also mention the ticket number in the svn commit's comments. Your comment above should have said something like "Fixed in r3332" and r3332's commit message should have mentioned #807. That is, put a hash (#) immediately followed by the ticket number (807) somewhere in the text of the commit message when there is a related ticket.

Changed 10 years ago by yemuru

  • status changed from reopened to closed
  • resolution set to fixed

I have fixed this issue, commit can be found at #r3364.

Note: See TracTickets for help on using tickets.