<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">thanks for the pointers. our particular
      app is <br>
      pretty specific to our needs. but i always like to <br>
      study how other people have tackled similar problems.<br>
      there's so much to learn.<br>
      <br>
      <br>
      On 12/2/15 4:24 PM, Benoit Chesneau wrote:<br>
    </div>
    <blockquote
cite="mid:CAJNb-9rw1W8xx2c+XMp1-onYapWvD+tbx1bkGt1JUdZhEnD7-w@mail.gmail.com"
      type="cite">
      <div dir="ltr">or <a moz-do-not-send="true"
          href="https://github.com/benoitc/cowboy_revproxy">https://github.com/benoitc/cowboy_revproxy</a>
        ...</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Wed, Dec 2, 2015 at 10:05 PM Geoff Cant <<a
            moz-do-not-send="true" href="mailto:nem@erlang.geek.nz"><a class="moz-txt-link-abbreviated" href="mailto:nem@erlang.geek.nz">nem@erlang.geek.nz</a></a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there,
          I’m sure you’re probably well along with your own code, but
          you may be interested in similar work. Heroku recently
          released Vegur - <a moz-do-not-send="true"
            href="https://github.com/heroku/vegur" rel="noreferrer"
            target="_blank">https://github.com/heroku/vegur</a> which is
          the HTTP/1.1 proxy library built on top of cowboy/ranch and
          used at scale there. Fred and I both haunt this list if you
          have questions about it. (It may be overkill, but if you need
          a lot of spec compliance or are doing large scale proxying it
          is designed for those things)<br>
          <br>
          Cheers,<br>
          -Geoff<br>
          <br>
          > On 1 Dec, 2015, at 10:38, Garry Hodgson <<a
            moz-do-not-send="true" href="mailto:garry@research.att.com"
            target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:garry@research.att.com">garry@research.att.com</a></a>> wrote:<br>
          ><br>
          > I've got an application where I'm using cowboy to build
          what is,<br>
          > in effect, a web proxy. It accepts http/s requests, makes
          some<br>
          > decisions about whether and where to forward, then makes
          its<br>
          > own request of the final endpoint and returns results. it
          was<br>
          > originally written in webmachine and then ported to
          cowboy.<br>
          ><br>
          > everything works fine, but for one small nit. it appears
          that<br>
          > cowboy automagically adds its own headers to the returned<br>
          > results, which causes duplicate headers for server,
          content-type,<br>
          > and content-length, as seen below.<br>
          ><br>
          > is there some way to avoid this?<br>
          ><br>
          > $ curl -X GET <a moz-do-not-send="true"
            href="http://localhost:8080/v0/log/logs?maxrecords=1"
            rel="noreferrer" target="_blank">http://localhost:8080/v0/log/logs?maxrecords=1</a>
          -k -H "$Creds"  -v<br>
          > * About to connect() to localhost port 8080 (#0)<br>
          > *   Trying 127.0.0.1... connected<br>
          > * Connected to localhost (127.0.0.1) port 8080 (#0)<br>
          > > GET /v0/log/logs?maxrecords=1 HTTP/1.1<br>
          > > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu)
          libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18
          libssh2/1.4.2<br>
          > > Host: localhost:8080<br>
          > > Accept: */*<br>
          > > Authorization:  Bearer
          bc18fb0f-4b1f-493e-823c-fbefa0383e91<br>
          > ><br>
          > < HTTP/1.1 200 OK<br>
          > < connection: keep-alive<br>
          > < server: Cowboy<br>
          > < date: Tue, 01 Dec 2015 17:34:29 GMT<br>
          > < content-length: 71<br>
          > < content-type: application/json<br>
          > < connection: Keep-Alive<br>
          > < date: Tue, 01 Dec 2015 17:34:30 GMT<br>
          > < server: AT&T SECWEB 2.1.0<br>
          > < content-length: 71<br>
          > < content-type: application/json<br>
          > < x-powered-by: PHP/5.4.28<br>
          > < keep-alive: timeout=5, max=100<br>
          > <<br>
          > * Connection #0 to host localhost left intact<br>
          > * Closing connection #0<br>
          > {"error":"Not found","error_description":"Could not read
          token in CTS"}<br>
          ><br>
          > --<br>
          > Garry Hodgson<br>
          > Lead Member of Technical Staff<br>
          > AT&T Chief Security Office (CSO)<br>
          ><br>
          > "This e-mail and any files transmitted with it are
          AT&T property, are confidential, and are intended solely
          for the use of the individual or entity to whom this e-mail is
          addressed. If you are not one of the named recipient(s) or
          otherwise have reason to believe that you have received this
          message in error, please notify the sender and delete this
          message immediately from your computer. Any other use,
          retention, dissemination, forwarding, printing, or copying of
          this e-mail is strictly prohibited."<br>
          ><br>
          > _______________________________________________<br>
          > erlang-questions mailing list<br>
          > <a moz-do-not-send="true"
            href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
          > <a moz-do-not-send="true"
            href="http://erlang.org/mailman/listinfo/erlang-questions"
            rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
          <br>
          _______________________________________________<br>
          erlang-questions mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
          <a moz-do-not-send="true"
            href="http://erlang.org/mailman/listinfo/erlang-questions"
            rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>