You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Hoover, David" <ho...@gmail.com> on 2008/11/19 17:18:23 UTC

[users@httpd] Newbie question about text line endings w/Linux server and Windows Explorer client

Hi,

I have some files stored in a 'downloads' area of an Apache 2.2.10
server running on Linux Fedora Core 9.  I access the files via Windows
Explorer 6.

If I view (click on Explorer link) a file named 'file.c' with the UNIX
linefeed convention, all of the text appears on a single line in my
Explorer window.

If I view the same file, but this time named 'file', with no
extension, the text appears correct in the window.

If I do a 'save as...' operation, both files are saved the same.

On some internet web servers, this problem doesn't occur with my browser.

Why is the text shown on one line?  What do I need to configure differently?

Sorry this must be a dumb question...but I haven't been able to find
an answer in the mailing list or on the net.

Thanks for the help,

DH.

---------------------------------
The config file is standard, with the following modification:

<Directory "/downloads">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Apache was compiled with the following options:
./configure --enable-dav --enable-ssl --enable-dumpio

---------------------------------------------------------------------
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] Newbie question about text line endings w/Linux server and Windows Explorer client

Posted by David Hoover <ho...@gmail.com>.
I checked out the headers, and then changed the server configuration so
that everything that needs correct screen formatting gets sent as
'plain/text' (instead of 'plain/x-c', for example, and it works.  Seems
like a hack, but it is sufficient for what I need to do.

Thanks,

DH.


On Wed, 2008-11-19 at 17:29 +0100, André Warnier wrote:
> Hi.
> 
> 1) recommended : install Firefox, and the LiveHttpHeaders plugin for 
> Firefox.  This allows you to see excactly which HTTP headers the server 
> is sending to the browser along with your file.
> This will tell you what the browser *should* do to display the file.
> (Well, not immediately and not as simply, but at least it will help).
> 
> 2) You are probably being hit by the usual IE symptom of "trying to be 
> smarter than you and than the HTTP standard".
> Normally, a browser is supposed to "believe" what the HTTP server tells 
> it, regarding the type of the document returned by the server.
> In particular, if the server says that this is a "text/plain" type of 
> document, then the browser should believe this and display it as "plain 
> text".
> However, in their infinite wisdom, MS decided that they could not really 
> trust these web servers, and MS IE makes its own personal evaluation of 
> what this document could possibly be.  If it then decides that this is 
> not a "text/plain" but something else, it will try to display it as that 
> something else.
> One of the criteria IE uses to determine "what this file could really 
> be, despite what the server tells me it is", is the file extension.
> To make it even more fun, it is not even totally consistent between IE 
> versions.
> 
> That's probably the cause of the differences you observe.
> Complain to MS, they must be used to it by now.
> There are a multitude of articles on the web, and even in the MS 
> Knowledge Base, which deal with this issue.
> Searching Google for "IE +mime +type" will give you a good overview.
> Enjoy.
> 
> 
> 
> 
> Hoover, David wrote:
> > Hi,
> > 
> > I have some files stored in a 'downloads' area of an Apache 2.2.10
> > server running on Linux Fedora Core 9.  I access the files via Windows
> > Explorer 6.
> > 
> > If I view (click on Explorer link) a file named 'file.c' with the UNIX
> > linefeed convention, all of the text appears on a single line in my
> > Explorer window.
> > 
> > If I view the same file, but this time named 'file', with no
> > extension, the text appears correct in the window.
> > 
> > If I do a 'save as...' operation, both files are saved the same.
> > 
> > On some internet web servers, this problem doesn't occur with my browser.
> > 
> > Why is the text shown on one line?  What do I need to configure differently?
> > 
> > Sorry this must be a dumb question...but I haven't been able to find
> > an answer in the mailing list or on the net.
> > 
> > Thanks for the help,
> > 
> > DH.
> > 
> > ---------------------------------
> > The config file is standard, with the following modification:
> > 
> > <Directory "/downloads">
> >     Options Indexes
> >     AllowOverride None
> >     Order allow,deny
> >     Allow from all
> > </Directory>
> > 
> > Apache was compiled with the following options:
> > ./configure --enable-dav --enable-ssl --enable-dumpio
> > 
> > ---------------------------------------------------------------------
> > 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
> > 
> 
> 
> ---------------------------------------------------------------------
> 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
> 


---------------------------------------------------------------------
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] Newbie question about text line endings w/Linux server and Windows Explorer client

Posted by André Warnier <aw...@ice-sa.com>.
Hi.

1) recommended : install Firefox, and the LiveHttpHeaders plugin for 
Firefox.  This allows you to see excactly which HTTP headers the server 
is sending to the browser along with your file.
This will tell you what the browser *should* do to display the file.
(Well, not immediately and not as simply, but at least it will help).

2) You are probably being hit by the usual IE symptom of "trying to be 
smarter than you and than the HTTP standard".
Normally, a browser is supposed to "believe" what the HTTP server tells 
it, regarding the type of the document returned by the server.
In particular, if the server says that this is a "text/plain" type of 
document, then the browser should believe this and display it as "plain 
text".
However, in their infinite wisdom, MS decided that they could not really 
trust these web servers, and MS IE makes its own personal evaluation of 
what this document could possibly be.  If it then decides that this is 
not a "text/plain" but something else, it will try to display it as that 
something else.
One of the criteria IE uses to determine "what this file could really 
be, despite what the server tells me it is", is the file extension.
To make it even more fun, it is not even totally consistent between IE 
versions.

That's probably the cause of the differences you observe.
Complain to MS, they must be used to it by now.
There are a multitude of articles on the web, and even in the MS 
Knowledge Base, which deal with this issue.
Searching Google for "IE +mime +type" will give you a good overview.
Enjoy.




Hoover, David wrote:
> Hi,
> 
> I have some files stored in a 'downloads' area of an Apache 2.2.10
> server running on Linux Fedora Core 9.  I access the files via Windows
> Explorer 6.
> 
> If I view (click on Explorer link) a file named 'file.c' with the UNIX
> linefeed convention, all of the text appears on a single line in my
> Explorer window.
> 
> If I view the same file, but this time named 'file', with no
> extension, the text appears correct in the window.
> 
> If I do a 'save as...' operation, both files are saved the same.
> 
> On some internet web servers, this problem doesn't occur with my browser.
> 
> Why is the text shown on one line?  What do I need to configure differently?
> 
> Sorry this must be a dumb question...but I haven't been able to find
> an answer in the mailing list or on the net.
> 
> Thanks for the help,
> 
> DH.
> 
> ---------------------------------
> The config file is standard, with the following modification:
> 
> <Directory "/downloads">
>     Options Indexes
>     AllowOverride None
>     Order allow,deny
>     Allow from all
> </Directory>
> 
> Apache was compiled with the following options:
> ./configure --enable-dav --enable-ssl --enable-dumpio
> 
> ---------------------------------------------------------------------
> 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
> 


---------------------------------------------------------------------
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