dorack / jiralicious

A Ruby library for interacting with JIRA's REST API
MIT License
49 stars 26 forks source link

Consider using httpparty's maintain_method_across_redirects #41

Open bbaugher opened 9 years ago

bbaugher commented 9 years ago

Specified a http URL for our JIRA instance which then later was setup for https and re-directed to that location. In this case I was doing a Jiralicious.search which was now returning all issues for JIRA instead of filtering with my JQL query. Using httpparty debug I found the re-direct was then having httpparty send the POST as a GET which is a different search REST API which doesn't look at the request body for JQL. Using maintain_method_across_redirects should resolve this issue.

httparty (0.11.0) jiralicious (0.5.0) JIRA : 6.3.12

shortdudey123 commented 7 years ago

Have you verified that the redirect is a 307/308 and not a 301/302? httparty should be honoring those and if not, a bug should be opened on their side

dorack commented 7 years ago

The question is why is httparty doing a redirect? by default the site should not be doing a redirect unless there is another mechanism in place forcing the non-persistent redirection. I would check your configurations ontop of the status codes to validate the state of the system.