Re: mod_rails: Strange, strange problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am also experiencing this problem with mod_rails/passenger. It appears that
something is putting a line break after one of the headers (content-type in
my case), and so any headers after that are treated as content.

This problem does not appear when using mongrel/webrick/thin on the same
server/installation.

Is this an apache issue? or mod_rails?

Has anyone resolved this issue?

Thank you.

pszmidt wrote:
> 
> Hi,
> 
> I'm having the same problem using mod_rails, when I switch to fastcgi,
> it's working good.
> Have you find a way to fix that?
> 
> Pat
> 
> 
> "Kyrre Nygård" wrote:
>> 
>> hello!
>> 
>> lately, all randomly, i've been getting plain text instead of my actual
>> pages. a refresh usually takes care of the problem. what's going on?
>> 
>> --
>>  
>> Content-Type: text/html; charset=utf-8
>>  Set-Cookie:
>> 
>> _mysite_session=BAh7CzoOcmV0dXJuX3RvMDoKdGl0bGV7BmkVdToJVGltZQ2IDhuAK1UeADoL
>>  %250AdG9waWNzewZpBnU7Bw2HDhuA2%252FZJ7zoJdXNlcmkGIgpmbGFzaElDOidBY3Rp
>>  %250Ab25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsAOgxj
>>  %250Ac3JmX2lkIiViMmRlMzgxNGMzY2ZjYmIxZGU4NzRkN2U1YjdiYmQxZQ%253D%253D--
>>  ac9348d5ff50b6471329f80bdcc3b896fce0840d; path=/
>>  Status: 500 Internal Server Error
>>  X-Powered-By: Phusion Passenger (mod_rails) 1.0.1
>>  X-Runtime: 0.00469
>>  Cache-Control: no-cache
>>  Content-Length: 854
>>  
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
>>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>  <html>
>>    <head>
>>      <meta http-equiv="Content-type" content="text/html;
>>  charset=utf-8">
>>      <title>error 500</title>
>>      <style type="text/css">@import "/stylesheets/display2.css";</
>>  style>
>>      <!--[if IE]><style type="text/css">@import "/stylesheets/
>>  display2_ie.css";</style><![endif]-->
>>      <link rel="icon" href="favicon.ico" type="image/x-icon">
>>      <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
>>    </head>
>>    <body>
>>      <ul id="breadcrumb">
>>        <li> / mysite </li>
>>        <li>&gt;error 500</li>
>>      </ul>
>>      <div id="content">
>>        <h1>sorry, something went wrong</h1>
>>        <p>we've been notified and will take a look at it shortly.</p>
>>      </div>
>>    </body>
>>  </html>
>>  
>> HTTP/1.1 200 OK
>>  Date: Sun, 20 Apr 2008 08:05:49 GMT
>>  Server: Apache/2.2.4 (FreeBSD) Phusion_Passenger/1.0.1
>>  X-Powered-By: Phusion Passenger (mod_rails) 1.0.1
>>  X-Runtime: 0.04539
>>  ETag: "0a31328a302a00012f17fc4ad2a11f5c"
>>  Cache-Control: private, max-age=0, must-revalidate
>>  Set-Cookie:
>>  _mysite_session=BAh7CzoOcmV0dXJuX3RvMDoKdGl0bGV7BmkVdToJVGltZQ2IDhuA
>>  %252FM8eFzoL
>>  %250AdG9waWNzewZpBnU7Bw2HDhuA2%252FZJ7zoJdXNlcmkGOgxjc3JmX2lkIiViMmRl
>>  %250AMzgxNGMzY2ZjYmIxZGU4NzRkN2U1YjdiYmQxZSIKZmxhc2hJQzonQWN0aW9u
>>  %250AQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%253D
>>  %253D--0cbb653970fceb4420abe42eda9d444b0c585bd5; path=/
>>  Content-Length: 2816
>>  Keep-Alive: timeout=5, max=99
>>  Connection: Keep-Alive
>>  Content-Type: text/html; charset=utf-8
>>  
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
>>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>  <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>>  <html>
>>    <head>
>>      <meta http-equiv="Content-type" content="text/html;
>>  charset=utf-8" />
>>      <title>mysite</title>
>>      <link href="/stylesheets/display2.css?1208612779" media="screen"
>>  rel="stylesheet" type="text/css" />
>>      <!--[if IE]><link href="/stylesheets/display2_ie.css?1208530127"
>>  media="screen" rel="stylesheet" type="text/css" /><![endif]-->
>>      <script src="/javascripts/prototype.js?1208530127" type="text/
>>  javascript"></script>
>>  <script src="/javascripts/effects.js?1208530126" type="text/
>>  javascript"></script>
>>  <script src="/javascripts/lowpro.js?1208530126" type="text/
>>  javascript"></script>
>>  <script src="/javascripts/time.js?1208530127" type="text/javascript"></
>>  script>
>>  <script src="/javascripts/application.js?1208530126" type="text/
>>  javascript"></script>
>>      <link rel="icon" href="favicon.ico" type="image/x-icon" />
>>      <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /
>>  
>>  
>>   </head>
>>    <body>
>>      <ul id="breadcrumb">
>>        <li> / mysite </li>
>>        <li>&gt;books</li>
>>        <!--<li class="google">&gt; # jom dorian marathon </li>-->
>>      </ul>
>>      <div id="content">
>>        <h1>books</h1>
>>        <ul class="options-header options-right">
>>            <li>[  /forums/books/topics/new new discussion</
>>  a> ]</li>
>>            <li>[  /settings my profile  ]</li>
>>            <li>[  /users users  ]</li>
>>            <li>[  /forums/books/posts.atom rss  ]</li>
>>            <li>[  /logout?to=%252Fforums%252Fbooks logout</
>>  a> ]</li>
>>        </ul>
>>        <table>
>>          <tr>
>>            <th>topics</th>
>>          </tr>
>>            <tr>
>>              <td>
>>                 /forums/books/topics/most-popular-books-
 right-now most popular books right now  by sultan 2
>>  minutes ago - sticky
>>              </td>
>>            </tr>
>>        </table>
>>      </div>
>>      <div id="footer">
>>        <p>&copy; 2008 mysite. all rights reserved.</p>
>>        <ul>
>>          <li> /admin admin </li>
>>          <li> /logout?to=%252Fforums%252Fbooks logout </li>
>>          <li> /about/main about mysite </li>
>>          <li> /about/safety personal safety tips </li>
>>          <li> /about/scams avoid scams &amp; fraud </li>
>>          <li> /about/terms terms of use </li>
>>          <li> /about/privacy privacy </li>
>>          <li> /forums/feedback feedback </li>
>>        </ul>
>>      </div>
>>    </body>
>>  </html>
>>  
>> Content-Type: text/html; charset=utf-8
>>  Set-Cookie:
>>  _mysite_session=BAh7CzoOcmV0dXJuX3RvMDoKdGl0bGV7BmkVdToJVGltZQ2IDhuA
>>  %252FM8eFzoL
>>  %250AdG9waWNzewZpBnU7Bw2HDhuA2%252FZJ7zoJdXNlcmkGOgxjc3JmX2lkIiViMmRl
>>  %250AMzgxNGMzY2ZjYmIxZGU4NzRkN2U1YjdiYmQxZSIKZmxhc2hJQzonQWN0aW9u
>>  %250AQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%253D
>>  %253D--0cbb653970fceb4420abe42eda9d444b0c585bd5; path=/
>>  Status: 500 Internal Server Error
>>  X-Powered-By: Phusion Passenger (mod_rails) 1.0.1
>>  X-Runtime: 0.04539
>>  ETag: "0a31328a302a00012f17fc4ad2a11f5c"
>>  Cache-Control: private, max-age=0, must-revalidate
>>  Content-Length: 854
>>  
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
>>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>  <html>
>>    <head>
>>      <meta http-equiv="Content-type" content="text/html;
>>  charset=utf-8">
>>      <title>error 500</title>
>>      <style type="text/css">@import "/stylesheets/display2.css";</
>>  style>
>>      <!--[if IE]><style type="text/css">@import "/stylesheets/
>>  display2_ie.css";</style><![endif]-->
>>      <link rel="icon" href="favicon.ico" type="image/x-icon">
>>      <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
>>    </head>
>>    <body>
>>      <ul id="breadcrumb">
>>        <li> / mysite </li>
>>        <li>&gt;error 500</li>
>>      </ul>
>>      <div id="content">
>>        <h1>sorry, something went wrong</h1>
>>        <p>we've been notified and will take a look at it shortly.</p>
>>      </div>
>>    </body>
>>  </html>
>>  
>> --
>>  
>> here's my apache httpd.conf:
>>  
>> ServerRoot "/usr/local"
>>  
>> Listen 80
>>  
>> LoadModule mime_module libexec/apache22/mod_mime.so
>>  LoadModule authz_host_module libexec/apache22/mod_authz_host.so
>>  LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/
>>  passenger-1.0.1/ext/apache2/mod_passenger.so
>>  RailsSpawnServer /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/bin/
>>  passenger-spawn-server
>>  RailsRuby /usr/local/bin/ruby18
>>  
>> DocumentRoot "/usr/local/www"
>>  
>> User www
>>  Group www
>>  
>> <Directory />
>>    AllowOverride None
>>    Order deny,allow
>>    Deny from all
>>  </Directory>
>>  
>> ErrorLog /var/log/httpd-error.log
>>  
>> LogLevel warn
>>  
>> <IfModule log_config_module>
>>    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i
>>  \"" combined
>>    LogFormat "%h %l %u %t \"%r\" %>s %b" common
>>    CustomLog /var/log/httpd-access.log combined
>>  </IfModule>
>>  
>> DefaultType text/plain
>>  
>> <IfModule mime_module>
>>    TypesConfig etc/apache22/mime.types
>>    AddType application/x-compress .Z
>>    AddType application/x-gzip .gz .tgz
>>  </IfModule>
>>  
>> NameVirtualHost *:80
>>  
>> <VirtualHost *:80>
>>    ServerName mysite.com
>>    ServerAlias www.mysite.com
>>    DocumentRoot /services/httpd/mysite.com/public
>>    <Directory "/services/httpd/mysite.com/public">
>>      Options FollowSymLinks
>>      AllowOverride None
>>      Order allow,deny
>>      Allow from all
>>    </Directory>
>>    RailsBaseURI /
>>  </VirtualHost>
>>  
>> --
>>  
>> and this is all i see in log/production.log:
>>  
>> Processing TopicsController#show (for 63.12.128.144 at 2008-04-20
>>  03:24:36) [GET]
>>    Session ID:
>> 
>> BAh7BzoKdGl0bGV7BmkVdToJVGltZQ2IDhuAtfXqYSIKZmxhc2hJQzonQWN0%0AaW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA
>>  %3D%3D--f637a4b4fcab4f610f77a3de430315c5a5028398
>>    Parameters: {"format"=>"ico", "action"=>"show", "id"=>"favicon",
>>  "controller"=>"topics", "forum_id"=>"books"}
>>  Completed in 0.01589 (62 reqs/sec) | Rendering: 0.00059 (3%) | DB:
>>  0.00000 (0%) | 406 Not Acceptable [http://mysite.com/forums/books/
>>  topics/favicon.ico]
>> 
>> ---------------------------------------------------------------------
>> 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@xxxxxxxxxxxxxxxx
>>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/mod_rails%3A-Strange%2C-strange-problem-tp16848077p22040231.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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux