-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a live test case for sending one or more file(s) using doRequest #16
Comments
Martin, is this a requirement for milestone 0.9? |
Well I dont think so, but it is a test we are lacking. So we can not 2012/9/28 John Heintz [email protected]
|
I just thought about, we do not need a live server to test the multi-part form features as well. We just need to submit the code against the mock agent. If you not specify a value for the file upload element (or set it to nothing) it will fail. Doing so we are able to test this in isolation. We can test all the multi-part form variants, too (file stream and alike) and also we can test the content body. I guess we can even test it by inspecting the request object created (getEntity should be available if not we just extend the request object to make it available or 'remember' the way it was created). If we make the entity element available using the request object we must take care for the file bodies and content body. The request is stored along the page being received (resource for later version) -> page.getRequest() (?). So this information is available within the history as well. So the best is to limit each request object to store the header fields, parameters, url and for every body content or file parameter we could provide the first 4KB and the overall size. Also this might become a configuration issue. But this would be designing ahead. So I guess we stick to 4KB limit since this should work for the most requests and only file transmitting and longer text might become a problem, if the text is not submitted using a normal parameter (which will not be affected by this restriction) but the multipart is used or a content body. I guess these are two or more additional issues. |
@MartinKersten can you look at the latest changes I made to master to extend the unit tests? (197db64) |
I've got problems with multi part requests, not sure if this code is correct
should it be
|
Hello Louis, Your suggestion certainly looks right in email... let me take a look today Cheers, ps - the project has been stalled, but it's still live. I've been busy with On Mon, Apr 15, 2013 at 1:01 PM, Louis Henry Nayegon <
John D. Heintz President, Gist Labs http://gistlabs.com Twitter: @jheintz http://twitter.com/jheintz Phone: 512-633-1198 |
…uld fail to compose multipart entity
@louisnayegon I've just published 0.11.1-SNAPSHOT that includes the fix for this into the maven repos. (At least I think I have :) Can you try that version? |
Currently multi-part submit and doRequest are not tested and should be tested using a real web site.
The text was updated successfully, but these errors were encountered: