Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAlert posting does not seem to follow HTTP redirects #668
Comments
This comment has been minimized.
This comment has been minimized.
|
Haven't looked deeply into this yet, but I'm wondering whether it has to do with this (redirects upon POST being problematic in HTTP in general because POST is not an idempotent operation): http://programmers.stackexchange.com/questions/99894/why-doesnt-http-have-post-redirect |
This comment has been minimized.
This comment has been minimized.
|
Indeed, it looks like when Go is following redirects and the method is Not sure why you don't see any followup request (not even Reading the code, it seems it might be possible to change Go's default behavior here by setting a custom |
This comment has been minimized.
This comment has been minimized.
|
Yes, that was my reading of the client.go awell. However, the spec seems to indicate that a 307 must not result in a changed method: Bug in client.go then? |
This comment has been minimized.
This comment has been minimized.
|
Interesting pointer. Yeah, the code does not make any differentiation for I found a bug reported about this already against Go, but the status is unclear - I left a comment: golang/go#7912 |
This comment has been minimized.
This comment has been minimized.
|
(That still doesn't explain why there was no followup request at all - I guess you verified that your redirector returns 307 with the appropriate headers?) |
This comment has been minimized.
This comment has been minimized.
|
Both curl and Firefox/Chrome are happy with the redirector's responses. |
brian-brazil
added
the
feature-request
label
Dec 16, 2015
brian-brazil
referenced this issue
Feb 4, 2016
Closed
HTTP 307 from alertmanager is not respected #1368
fabxc
added
kind/enhancement
and removed
feature request
labels
Apr 28, 2016
This comment has been minimized.
This comment has been minimized.
|
@quolix FYI, golang/go#7912 has been fixed and the fix will be in Go 1.8. So once that's out and Prometheus uses Go 1.8, then this should work. |
This comment has been minimized.
This comment has been minimized.
|
We're on Go 1.8 now. |
brian-brazil
closed this
Jul 14, 2017
simonpasquier
pushed a commit
to simonpasquier/prometheus
that referenced
this issue
Oct 12, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
quolix commentedMay 4, 2015
I try running prometheus on Mesos, where jobs get assigned dynamic ports. I have an http redirector that redirects requests to specific hostnames to the correct hosts and ports on Mesos via 303/307/308. I want to use that to make prometheus POST its alerts to the alert manager.
However it seems that the redirect is never followed, indicated by tcpdump and netstat not showing any TCP traffic to the actual alert manager port.