You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Cole <mi...@michaelcole.com> on 2010/08/31 00:32:06 UTC

[users@httpd] Intermittent "Request header field is missing ':' separator." on https

Hello,

I'm trying to resolve a problem with intermittent "Bad Request" errors from
apache:

     Bad Request

     Your browser sent a request that this server could not understand.
     Request header field is missing ':' separator.

     olhuaqv3o1t29flvr0

     Apache/2.2.14 (Ubuntu) Server at xxx.net Port 443

These Bad Requests only happen with https (SSL cert from godaddy.com).
Regular http doesn't show this problem.  They are happening on both IE and
Firefox.

They showed up out of nowhere last friday (of course after I emailed a URL
to a client :-)

These "Bad Request" responses come back intermittently.  I've checked that
the "good" requests are exactly the same as the "bad" ones with Firebug.
This is an example of a form POST, but it also happens on page GETs.

  Here is an example of the request:
  POST /index.php HTTP/1.1
  Host: xxx.net
  User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8)
Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
  Accept: text/javascript, text/html, application/xml, text/xml, */*
  Accept-Language: en-us,en;q=0.5
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 115
  Connection: keep-alive
  X-Requested-With: XMLHttpRequest
  X-Prototype-Version: 1.6.0.3
  Content-Type: application/x-www-form-urlencoded; charset=UTF-8
  Referer: https://xxx.net/index.php?controller=User&action=default
  Content-Length: 44
  Cookie: secorix=i4dq7b23gcgf8trrprr6ieq5j5
  Pragma: no-cache
  Cache-Control: no-cache

The server is hosted by Amazon Web services, and is Ubuntu 10.04's standard
server distribution.  $ dpkg -l '*apache*'
ii  apache2
2.2.14-5ubuntu8                               Apache HTTP Server metapackage
ii  apache2-mpm-prefork
2.2.14-5ubuntu8                               Apache HTTP Server -
traditional non-threaded model
ii  apache2-threaded-dev
2.2.14-5ubuntu8                               Apache development headers -
threaded MPM
ii  apache2-utils
2.2.14-5ubuntu8                               utility programs for
webservers
ii  apache2.2-bin
2.2.14-5ubuntu8                               Apache HTTP Server common
binary files
ii  apache2.2-common
2.2.14-5ubuntu8                               Apache HTTP Server common
files
ii  libapache2-svn
1.6.6dfsg-2ubuntu1                            Subversion server modules for
Apache

>From the error log, I get these errors (intermixed with everything else):
[Mon Aug 30 21:27:06 2010] [warn] Init: Name-based SSL virtual hosts only
work for clients with TLS server name indication support (RFC 4366)
[Mon Aug 30 21:27:06 2010] [notice] Apache/2.2.14 (Ubuntu) DAV/2 SVN/1.6.6
PHP/5.3.2-1ubuntu4.2 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k
configured -- resuming normal operations
[Mon Aug 30 18:04:53 2010] [error] Hostname xxx.net provided via SNI, but no
hostname provided in HTTP request
[Mon Aug 30 21:28:15 2010] [error] [client 64.71.7.18] request failed: error
reading the headers
[Mon Aug 30 21:53:42 2010] [error] [client 64.71.7.18] request failed: error
reading the headers, referer:
https://xxx.net/index.php?controller=User&action=default

I've been searching forums all day but haven't found any fixes.  Reset
browser cookies, and checked for proxies.  Any advice?

Thanks in advance,

Mike

[users@httpd] Re: Intermittent "Request header field is missing ':' separator." on https

Posted by Lance <la...@hangar1018.com>.
I've seen this exact same issue.  Similar setup. 
 I too am using Ubuntu 10.04 / Apache / Go Daddy Cert. 
Restarting Apache is the only solution I've come up with. 
 Are you also running mod_rewrite.  
I had a suspicion that mod_rewrite might be the culprit but 
if you've narrowed it down to mod_ssl that helps 
reduce some variables.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] are you using mod_rewrite?

Posted by frankysanders <la...@gmail.com>.
Are you running multiple virtual host?  I'm not sure if this has anything to
do with the bug but I've temporarily disabled all virtual host so that I'm
only using a single virtual host and have yet been able to replicate the
bug.  Then again, this bug only seems to present itself once apache has been
running for a while.

I'll report back as I do more testing.

Lance


michael cole-4 wrote:
> 
> Hi,
> 
> I disabled mod_rewrite and mod_deflate and haven't seen the problem since.
> I have mod_ssl enabled and use https for the application.
> 
> That's the same error I was getting in my logs.  I have to do some more
> testing, but if you want a lead, those two modules are it.
> 
> Mike
> 
> 
> On Fri, Sep 3, 2010 at 9:51 AM, figfig <ph...@employeehub.com> wrote:
> 
>>
>> Hi guys,
>>
>> I've been having the exact same problem. I'm also using Apache 2, Ubuntu
>> 10.04 and a GoDaddy SSL certificate. Every now and then I get a Bad
>> Request.
>> The error log shows
>>
>> "Hostname mysite.com provided via SNI, but no hostname provided in HTTP
>> request"
>>
>> If I restart Apache it doesn't occur for a while but always comes back.
>> I've
>> noticed it in Firefox.
>>
>> Has anyone worked out what the problem is?
>>
>> --
>> View this message in context:
>> http://old.nabble.com/-users%40httpd--Intermittent-%22Request-header-field-is-missing-%27%3A%27-separator.%22-on-https-tp29577884p29616242.html
>> Sent from the Apache HTTP Server - Users mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/-users%40httpd--Intermittent-%22Request-header-field-is-missing-%27%3A%27-separator.%22-on-https-tp29577884p29639145.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] are you using mod_rewrite?

Posted by frankysanders <la...@gmail.com>.
I have done some research on this subject and found the following.  The error
only occurs for me when making HTTPS request.  If I make an HTTP request I
never experience this issue.  Additionally I've found that setting a
content-type header alleviates the problem.  Specifically setting the
charset from iso-8859-1 to utf-8 removes the issue.  

This bug is extremely hard to reproduce as it seems that apache needs to run
a while, perhaps days, before the bug presents itself.

Following is my test script using PHP and Curl. Please note the Content-Type
header commented out.  In my case setting the charset to iso-8859-1 causes
the bug to present itself.  On the other hand setting it to utf-8
mysteriously fixes the issue.

Could it be an encoding issue? 

Mike, in regards to your comments about mod_rewrite and mod_deflate.  I do
have a mod_rewrite rule that forces port 80 traffic to port 443 so this
could just as well be part of the issue.  Perhaps mod_rewrite is having a
parsing error when parsing non utf-8 charsets?  I do have mod_deflate
installed but I'm not sure how that it behaves differently for HTTP versus
HTTPS and because I'm unable to reproduce the issue on HTTP request I'm
assuming that the issue must either be mod_rewrite or mod_ssl.  You
mentioned in your post that you've yet to see the issue and you're running
mod_ssl, so that increases my suspicion about mod_rewrite.

Test script follows:

    while ($i <= 1000)
    {
      echo $i."\n";
      $ch = curl_init('https://www.url.com');
      curl_setopt($ch, CURLOPT_HEADER, true); 
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
      //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/html;
charset=utf-8'));
      $output = curl_exec($ch);
      
      $info = curl_getinfo($ch);
      if($info['http_code'] == 400)
      {
        echo $output;
        exit();
      }
      curl_close($ch);
      $i++;
      
      sleep(1);
    }

Lance

michael cole-4 wrote:
> 
> Hi,
> 
> I disabled mod_rewrite and mod_deflate and haven't seen the problem since.
> I have mod_ssl enabled and use https for the application.
> 
> That's the same error I was getting in my logs.  I have to do some more
> testing, but if you want a lead, those two modules are it.
> 
> Mike
> 
> 
> On Fri, Sep 3, 2010 at 9:51 AM, figfig <ph...@employeehub.com> wrote:
> 
>>
>> Hi guys,
>>
>> I've been having the exact same problem. I'm also using Apache 2, Ubuntu
>> 10.04 and a GoDaddy SSL certificate. Every now and then I get a Bad
>> Request.
>> The error log shows
>>
>> "Hostname mysite.com provided via SNI, but no hostname provided in HTTP
>> request"
>>
>> If I restart Apache it doesn't occur for a while but always comes back.
>> I've
>> noticed it in Firefox.
>>
>> Has anyone worked out what the problem is?
>>
>> --
>> View this message in context:
>> http://old.nabble.com/-users%40httpd--Intermittent-%22Request-header-field-is-missing-%27%3A%27-separator.%22-on-https-tp29577884p29616242.html
>> Sent from the Apache HTTP Server - Users mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/-users%40httpd--Intermittent-%22Request-header-field-is-missing-%27%3A%27-separator.%22-on-https-tp29577884p29639141.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] are you using mod_rewrite?

Posted by Michael Cole <mi...@michaelcole.com>.
Hi,

I disabled mod_rewrite and mod_deflate and haven't seen the problem since.
I have mod_ssl enabled and use https for the application.

That's the same error I was getting in my logs.  I have to do some more
testing, but if you want a lead, those two modules are it.

Mike


On Fri, Sep 3, 2010 at 9:51 AM, figfig <ph...@employeehub.com> wrote:

>
> Hi guys,
>
> I've been having the exact same problem. I'm also using Apache 2, Ubuntu
> 10.04 and a GoDaddy SSL certificate. Every now and then I get a Bad
> Request.
> The error log shows
>
> "Hostname mysite.com provided via SNI, but no hostname provided in HTTP
> request"
>
> If I restart Apache it doesn't occur for a while but always comes back.
> I've
> noticed it in Firefox.
>
> Has anyone worked out what the problem is?
>
> --
> View this message in context:
> http://old.nabble.com/-users%40httpd--Intermittent-%22Request-header-field-is-missing-%27%3A%27-separator.%22-on-https-tp29577884p29616242.html
> Sent from the Apache HTTP Server - Users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] are you using mod_rewrite?

Posted by figfig <ph...@employeehub.com>.
Hi guys,

I've been having the exact same problem. I'm also using Apache 2, Ubuntu
10.04 and a GoDaddy SSL certificate. Every now and then I get a Bad Request.
The error log shows 

"Hostname mysite.com provided via SNI, but no hostname provided in HTTP
request"

If I restart Apache it doesn't occur for a while but always comes back. I've
noticed it in Firefox.

Has anyone worked out what the problem is?

-- 
View this message in context: http://old.nabble.com/-users%40httpd--Intermittent-%22Request-header-field-is-missing-%27%3A%27-separator.%22-on-https-tp29577884p29616242.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] are you using mod_rewrite?

Posted by Michael Cole <mi...@michaelcole.com>.
Hi Lance,

Yes, I have mod_rewrite enabled, but my application doesn't require it.
I'll disable it and see if that helps.

When I configure the app to use http, instead of https, the issue goes away,
even through mod_ssl is still enabled.  This makes me think mod_ssl is part
of the issue.

I'm getting these errors in Firefox 3.6, and can see them in Firebug.
My client reported them in IE (not sure the version).  This makes me think
the issue is server-side.

I included a POST in the orignial email, but I remember a GET that failed as
well - different message, but same problem.

One thing I thought I'd try is to use apache 2.2.12 or 2.2.16.  I remember
seeing a bug fix in 2.2.14 that was related.  (Forgot to bookmark it)

I'm getting the error on a "demo" server so I have to spin up a new
"staging" server to run my tests.

Thanks for the tip on mod_rewrite, Lance.  If I find anything I'll email
you.

Mike

On Wed, Sep 1, 2010 at 3:42 AM, Lance <la...@hangar1018.com> wrote:

> I’ve seen this same issue. I thought the issue might be related to
> mod_rewrite.
> To your knowledge, are you using mod_rewrite to redirect urls?
> If not then SSL must be the root cause as I’m using both.
> I’ve been chasing this bug for nearly 6 months now.
>
> Lance
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

[users@httpd] are you using mod_rewrite?

Posted by Lance <la...@hangar1018.com>.
I’ve seen this same issue. I thought the issue might be related to mod_rewrite. 
To your knowledge, are you using mod_rewrite to redirect urls? 
If not then SSL must be the root cause as I’m using both.
I’ve been chasing this bug for nearly 6 months now.

Lance




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache restart

Posted by Eric Covener <co...@gmail.com>.
On Wed, Sep 1, 2010 at 6:52 AM, Lance <la...@hangar1018.com> wrote:
> I should note that restarting apache seems to fix the problem.
> It's the only solution i've come up with.
> If you consider restarting a solution.
> Surely something else must be going on.
>
>
Lance,

Are you hitting "reply" in your mail client, or composing new messages
with old topics?

Your last few replies to this list have shown up (for me at least) as
new threads.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] apache restart

Posted by Lance <la...@hangar1018.com>.
I should note that restarting apache seems to fix the problem.  
It's the only solution i've come up with.
If you consider restarting a solution.  
Surely something else must be going on.





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org