You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Till Klampaeckel (JIRA)" <ji...@apache.org> on 2011/07/04 02:15:21 UTC

[jira] [Created] (COUCHDB-1213) proxy with external api doesn't work

proxy with external api doesn't work
------------------------------------

                 Key: COUCHDB-1213
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1213
             Project: CouchDB
          Issue Type: Bug
    Affects Versions: 1.1
            Reporter: Till Klampaeckel


As discussed on IRC, I'm trying to use an external web API, but every request to the handler produces an infinite loop.

This is most likely due to not passing on the correct Host header.

Here's an example:

_google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com/ig">>}

Then request with:

curl -L -X GET http://127.0.0.1:5984/_google/calculator?hl=en&q=100EUR%3D%3FAUD

Paul Davis did a quick patch: http://friendpaste.com/62T88HOYw8QyaoIJoXEGXr

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1213) proxy with external api doesn't work

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059305#comment-13059305 ] 

Paul Joseph Davis commented on COUCHDB-1213:
--------------------------------------------

Proxy wasn't sending the proper Host header so it was confusing the external web servers.

The question is what to do for local things that want the host info. Should we just set the X-Forwarded-* headers and call it good?

> proxy with external api doesn't work
> ------------------------------------
>
>                 Key: COUCHDB-1213
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1213
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Till Klampaeckel
>              Labels: patch, proxy
>
> As discussed on IRC, I'm trying to use an external web API, but every request to the handler produces an infinite loop.
> This is most likely due to not passing on the correct Host header.
> Here's an example:
> _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com/ig">>}
> Then request with:
> curl -L -X GET http://127.0.0.1:5984/_google/calculator?hl=en&q=100EUR%3D%3FAUD
> Paul Davis did a quick patch: http://friendpaste.com/62T88HOYw8QyaoIJoXEGXr

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1213) proxy with external api doesn't work

Posted by "Randall Leeds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060074#comment-13060074 ] 

Randall Leeds commented on COUCHDB-1213:
----------------------------------------

+1 for X-Forwarded-*

> proxy with external api doesn't work
> ------------------------------------
>
>                 Key: COUCHDB-1213
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1213
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Till Klampaeckel
>              Labels: patch, proxy
>
> As discussed on IRC, I'm trying to use an external web API, but every request to the handler produces an infinite loop.
> This is most likely due to not passing on the correct Host header.
> Here's an example:
> _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com/ig">>}
> Then request with:
> curl -L -X GET http://127.0.0.1:5984/_google/calculator?hl=en&q=100EUR%3D%3FAUD
> Paul Davis did a quick patch: http://friendpaste.com/62T88HOYw8QyaoIJoXEGXr

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1213) proxy with external api doesn't work

Posted by "Till Klampaeckel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060098#comment-13060098 ] 

Till Klampaeckel commented on COUCHDB-1213:
-------------------------------------------

I +1 this +1

> proxy with external api doesn't work
> ------------------------------------
>
>                 Key: COUCHDB-1213
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1213
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Till Klampaeckel
>              Labels: patch, proxy
>
> As discussed on IRC, I'm trying to use an external web API, but every request to the handler produces an infinite loop.
> This is most likely due to not passing on the correct Host header.
> Here's an example:
> _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com/ig">>}
> Then request with:
> curl -L -X GET http://127.0.0.1:5984/_google/calculator?hl=en&q=100EUR%3D%3FAUD
> Paul Davis did a quick patch: http://friendpaste.com/62T88HOYw8QyaoIJoXEGXr

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1213) proxy with external api doesn't work

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060101#comment-13060101 ] 

Paul Joseph Davis commented on COUCHDB-1213:
--------------------------------------------

Someone feel like compiling a list of the usual suspects to insert?

> proxy with external api doesn't work
> ------------------------------------
>
>                 Key: COUCHDB-1213
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1213
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Till Klampaeckel
>              Labels: patch, proxy
>
> As discussed on IRC, I'm trying to use an external web API, but every request to the handler produces an infinite loop.
> This is most likely due to not passing on the correct Host header.
> Here's an example:
> _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com/ig">>}
> Then request with:
> curl -L -X GET http://127.0.0.1:5984/_google/calculator?hl=en&q=100EUR%3D%3FAUD
> Paul Davis did a quick patch: http://friendpaste.com/62T88HOYw8QyaoIJoXEGXr

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1213) proxy with external api doesn't work

Posted by "Jan Lehnardt (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13139795#comment-13139795 ] 

Jan Lehnardt commented on COUCHDB-1213:
---------------------------------------

X-Forwarded-For
X-Forwarded-Host
X-Forwarded-Proto
                
> proxy with external api doesn't work
> ------------------------------------
>
>                 Key: COUCHDB-1213
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1213
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Till Klampaeckel
>              Labels: patch, proxy
>
> As discussed on IRC, I'm trying to use an external web API, but every request to the handler produces an infinite loop.
> This is most likely due to not passing on the correct Host header.
> Here's an example:
> _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com/ig">>}
> Then request with:
> curl -L -X GET http://127.0.0.1:5984/_google/calculator?hl=en&q=100EUR%3D%3FAUD
> Paul Davis did a quick patch: http://friendpaste.com/62T88HOYw8QyaoIJoXEGXr

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira