Re: IIS6 file download problem
From: Larry (larry_at_abc.com)
Date: 07/26/04
- Next message: REDDY: "IIS SERVER PROBLEM"
- Previous message: Ken Schaefer: "Re: IIS 6 Questions"
- In reply to: Ken Schaefer: "Re: IIS6 file download problem"
- Messages sorted by: [ date ] [ thread ]
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);
> > > >
> > > > . . .
> > > > }
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: REDDY: "IIS SERVER PROBLEM"
- Previous message: Ken Schaefer: "Re: IIS 6 Questions"
- In reply to: Ken Schaefer: "Re: IIS6 file download problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|