[ingela@REDACTED: Re: http:request/4 headers]
Michael McDaniel
erlang@REDACTED
Sat Apr 16 00:40:37 CEST 2005
On Fri, Apr 15, 2005 at 08:01:53AM -0700, Michael McDaniel wrote:
> On Fri, Apr 15, 2005 at 07:33:33AM -0700, Michael McDaniel wrote:
> > ----- Forwarded message from Ingela Anderton <ingela@REDACTED> -----
> >
> > From: Ingela Anderton <ingela@REDACTED>
> > Date: Fri, 15 Apr 2005 08:54:17 +0200
> > To: erlang@REDACTED
> > Subject: Re: http:request/4 headers
> >
> >
> > Michael McDaniel wrote:
> > > I need to control case for http headers POSTing to an application.
> > >
> > > http:request/4 makes my headers lowercase.
> > >
> > > QUESTION: How can I keep my headers the case I want.
> > >
> > >
> > > EXAMPLE:
> > > catch http:request(post,
> > > {"http://server.providing.services.example.com/specialApplication/",
> > > [
> > > {"Date", httpd_util:rfc1123_date()} ,
> > > {"Host", "server.providing.services.example.com"} ,
> > > {"REALM", "SPECMA"} ,
> > > {"APIVER", "SPECMA:2.0"} ,
> > > {"Authorization ", http_base_64:encode("username:password")} ,
> > > {"Accept", "text/xml/html"},
> > > {"User-Agent", "erlang client"}
> > > ], "application/x-www-form-urlencoded", Body }, [], []).
> > >
> > > All the headers are converted to lower case and the application needs the
> > > uppercase headers as uppercase. Works the same with http or https.
> > >
> > > I have not yet found the control to keep uppercase headers; thanks for any assistance.
> >
> > At the moment there is no such option in inets. If there is a good
> > enough reason I could perhaps add one, but for the moment it does not
> > feel very prioritized! As I see it the real problem is that your
> > application is not abiding to the standard.
> >
> > From the RFC 2616: HTTP header fields, which include
> > general-header (section 4.5), request-header (section 5.3),
> > response-header (section 6.2), and entity-header (section 7.1) fields,
> > follow the same generic format as that given in Section 3.1 of RFC 822
> > [9]. Each header field consists of a name followed by a colon (":")
> > and the field value. Field names are case-insensitive.
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Thank you, Ingela. I thought late last night about whether the other
> application was standards conformant and apologize for not checking
> prior to taking up your time.
>
> I will request to the company who provides the service over the Internet
> if they will make their application standards (RFC 2616) conformant.
>
> ~~Michael
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Turns out that header CaSe was not a factor in the problems we were having
between our applications.
~~M
>
>
> >
> > --
> > /Ingela - OTP team
> >
More information about the erlang-questions
mailing list