On Mon, Dec 14, 2009 at 23:11, Christian Hammond <chip...@chipx86.com> wrote:
> It should just be the field constraints from those FileFields. We don't do
> any custom validation checks in those forms that I can see.
>
> It could potentially fail if the diff itself is empty, even though the name
> is populated. Are they uploading using post-review? Might be worth seeing
> what post-review --output-diff shows. Or otherwise, just making sure the
> diff is non-empty.
>
> Short of that, I wouldn't be able to see off-hand without seeing the code
> and doing my own debugging.

After a lengthy debugging session I think I figured out what is going
on, although the solution still is not 100% clear to me:
- In json.new_diff the request.POST field is completely empty, so
Django is completely right when complaining about the absence of some
fields.
- On the client side, though, the request looks sensible and the MIME
body is correctly built.
- In post-review's http_post method, however, the Content-Length
header is calculated as len(body), which will calculate the length of
the body incorrectly if it contains non-ASCII characters. So, in the
end the sent Content-Length header is shorter than the actual request
body, which will cause Django not to find the terminating MIME
boundary thus ignoring the body.

The question is, how can I calculate the length of this string in
bytes, not characters, taking the wire encoding into account?

> Though it's probably not the cause, it also might be worth checking if there
> are any proxy settings getting in the way. We used to run into some issues
> with users who were going through the proxy for the Review Board server
> (despite it being within the network), and some stuff broke along the way.
> Though I don't believe we hit file upload issues.

I disabled proxies in our custom post-review implementation, so that's
not an issue.

Regards,
Thilo

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to