Set content-length header to 0 when entity is null#394
Set content-length header to 0 when entity is null#394thanhedman wants to merge 1 commit intokillbilling:masterfrom
Conversation
|
Sample error: |
|
@thanhedman Thanks for reporting. We're looking into this and will respond soon. |
|
@thanhedman which version of the library are you using? |
|
@joannasese Discovered in production with |
|
If you're a Recurly employee, I believe there is also back-channel communication going on about this, via Jeff Sheldon. |
|
Hi @thanhedman. After looking into this, we found that the issue with content-length headers is addressed through an Apache upgrade that has yet to be released. We'll get |
|
Hi @thanhedman, I recently switched out the underlying HTTP client of this library from an outdated ning AHC to Apache HC4. I'm pretty sure that Apache HC4 will fix this issue. So basically the version you are having issues with is still using the old HTTP client. So I don't think this pull request is necessary. |
|
@joannasese @slisaasquatch that all makes sense! I saw the lib changes on |
|
@slisaasquatch thanks again! that PR is paying dividends. |
Requests for
nullentity operations (likeresumeSubscription) are now rejected by the Recurly v2 API with status code411. This is because content-length header is not set in the case where there is no entity.This PR sets the content-length header to 0 when the entity is null.