Re: IIS6 file download problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Larry (larry_at_abc.com)
Date: 07/26/04


Date: Mon, 26 Jul 2004 02:52:02 GMT

thanks a lot,

I found a lot of information by searching that online.
I will study them to see if I can find out the problem in my code.

thanks again,
larry

"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
news:utk$22pcEHA.3480@TK2MSFTNGP11.phx.gbl...
> They are in the relevant RFC (HTTP v1.1)
>
> Chees
> Ken
>
>
> "Larry" <larry@abc.com> wrote in message
> news:CHSMc.108599$od7.66020@pd7tw3no...
> > thanks for your reply,
> >
> > Sorry I left my project in my office. I will get it on Monday.
> >
> > Would you please provide a sample good header with a piece of code? or
> where
> > I can find some good header samples?
> >
> > thanks a lot,
> > larry
> >
> >
> > "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
> > news:eN0jc%23jcEHA.3300@TK2MSFTNGP09.phx.gbl...
> > > Please show us the actual HTTP headers you are using for the request.
> Bad
> > > Request means that your request is somehow malformed. We need to see
> what
> > > you are acutally outputting as the HTTP request.
> > >
> > > Cheers
> > > Ken
> > >
> > > "Larry" <larry@abc.com> wrote in message
> > > news:7HxMc.104011$Mr4.5338@pd7tw1no...
> > > > Hi,
> > > >
> > > > I had a project which download files from our company server. It
> always
> > > > worked before until we switch to IIS 6 (win2003).
> > > > My program always get "<h1>Bad Request (Invalid Header Name)</h1>".
> > > >
> > > > I checked MS site, and got article "828726": which says:
> > > > ----------------------
> > > > "In Microsoft Internet Information Services (IIS) 6.0, when a
request
> > > > contains a header name that includes a question mark (?) character
or
> > > > another separator character, Http.sys rejects the request and sends
> the
> > > > following error message to the requestor:
> > > >
> > > >
> > > > Bad Request (Invalid Header Name)"
> > > > ----------------------
> > > >
> > > > here is my code, anyone can help me to take out the "separator
> > character"?
> > > > or any other way to do that?
> > > > thanks a lot,
> > > > larry
> > > >
> > > > ---------
> > > > CHttpUpdater * p = (CHttpUpdater*)pTran;
> > > > CString szHeaders = _T("Accept: */*\r\nUser-Agent: InetHttp\r\n");
> > > >
> > > >
> > > > LPCTSTR pstrAcceptTypes ="*/*";
> > > > DWORD dwFlags = INTERNET_FLAG_EXISTING_CONNECT;// |
> > > > INTERNET_FLAG_NO_AUTO_REDIRECT;
> > > > TRY
> > > > {
> > > > if (p->IsHalt()) AfxThrowUserException();
> > > > p->m_pFile =
> > > p->m_pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,
> > > > p->m_sRemoteFileName, NULL, 1, &pstrAcceptTypes, NULL, dwFlags);
> > > >
> > > > p->m_pFile->AddRequestHeaders(szHeaders);
> > > >
> > > > . . .
> > > > }
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Test
    ... Larry it is so good to see you online. ... my voice is no longer consistent enough to use voice recognition very ... motorized wheelchair which I think it is a necessity in your case rather ...
    (alt.support.mult-sclerosis)
  • Re: I am back ... AGAIN!
    ... Sorry to hear about the problems, Larry, but glad you're back online. ... on Arixtra to keep the evil clots away, and even WITH insurance, it is ... The doc originally prescribed Lovenox, ...
    (rec.music.makers.guitar.acoustic)
  • Re: Valley Forge antics
    ... guy talking about the VF incident. ... "I'm not sure whether I should delete this thread and ban Jocko or not. ... Larry is a professional, ... There are other things which I will not go into online, ...
    (rec.sport.billiard)
  • Re: New FAQ is now available
    ... >The 2005 edition of the NBA Salary Cap/Collective Bargaining ... >Agreement FAQ is now available online at ... Nice stuff, Larry. ...
    (alt.sports.basketball.nba.la-lakers)
  • Re: sp2 cd
    ... > Larry, why do you persist in posting a new message as a reply to an old ... He did not post to an old thread (if you take a look at his posting ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.general)