Skip to content
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

Upload Fixes #32

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Upload Fixes #32

wants to merge 9 commits into from

Conversation

evanjpw
Copy link
Contributor

@evanjpw evanjpw commented Jan 29, 2019

This PR contains two fixes for document upload

  1. There was an issue where Java fixed a "security problem" such that one could not set the content lenhth. To fix this, I used an empty array rather than null as the content.
  2. There was an issue where the server returned a 204 status when the client code was only aware of 200 and 202. I added 204 as a possible correct status.

evanjpw and others added 9 commits December 5, 2016 14:43
Add methods to the API that implement sendFax using an array of
InputStreams rather than an array of files.
These are unit tests to test the added sendFax methods that send a fax
using input streams
# Conflicts:
#	src/main/java/net/interfax/rest/client/InterFAX.java
#	src/main/java/net/interfax/rest/client/impl/DefaultInterFAXClient.java
Document upload and send uploaded document were getting a code
411 because the content length was not being sent. This is because
Java began filtering content length because it is considered dangerous
to be settable.

This fix repairs that problem by sending actal zero byte content
which circumvents the issue.
The current code code of the uploadChunk method allowed
200 and 202 as valid response codes. However, the server
also sends 204s and the method incorrectly identified
this as an error. This commit corrects that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant