Given that our Director function can't return an error indicating that it
won't handle the request, I notice that we can instead panic it and then
*http.conn.serve() will recover and close the connection with the client.
Aside from forgoing a descriptive HTTP response, is this a bad solution?
On Sunday, 12 August 2012 02:45:17 UTC+1, Andrew Gerrand wrote:

Unfortunately such a change would break compatibility with Go 1 programs.

You have a couple of options:

1a. Implement a custom http.RoundTripper that checks for a specific
header in the request and sends an HTTP error if it is present.
1b. Have your Director function set that specific header when no rute is

2. Make a copy of the reverseproxy code, make your changes to it, and use

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupgolang-nuts @
postedMay 13, '13 at 4:39p
activeMay 13, '13 at 4:39p

1 user in discussion

Frou: 1 post



site design / logo © 2022 Grokbase