Delete the request body when changing the method to "DELETE" #964
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue(s) and PR(s)
This PR closes #955
Type of change
List of changes made
When detecting that a time entry should be deleted, the request body is deleted. This avoids a complaint from any intermediate network proxy from complaining about the request.
How to test
To test the change, you will have to reproduce the error. You can do that by setting up a local HAProxy instance between your Urdr instance and Redmine, like this:
Possibly, create a temporary empty directory and change into it.
Create a HAProxy configuration file,
haproxy.cfg
, containing the following:Change
192.168.1.20:3000
to the Redmine instance that you want to connect to.Start the
haproxy
Docker container running in the background:Later, when you don't need the container any longer, remove it with:
You should then configure Urdr to connect to your HAProxy instead of Redmine. I do this by setting the relevant variables in
urdr.env
to point to the HAProxy container's port 3333 (this is3333
from-p 3333:80
on the command line when the HAProxy container was started):(The IP address
192.168.1.20
is the external IP of my local machine.)The bug should manifest when you try to remove an existing time entry by setting its hour values to zero in the web UI. Applying the code changes in this PR should fix the issue and you should be able to remove time entries.