Thread: Servers

  1. #16
    Registered User whackaxe's Avatar
    Join Date
    Mar 2004
    Posts
    332
    Quote Originally Posted by -=SoKrA=-
    Almost.
    You receive the output of php and you add the headers you need to make a proper HTTP response.
    .
    almost ,

    PHP generates this

    content-type: text/html
    X-Powered-by: PHP/4.3.4


    some security mad folks parse their HTMl through PHP too actually so people worn't know they are using it. i don't see what it's security value is, but its not much methinks

  2. #17
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    >>but its not much methinks
    You could stop worms that are looking to infect your precious IIS server :P
    Back to the server: Even if php gives you the content type, you still need to tell the client that you're gonna give him the page he asked for (200 OK response), and that's what I meant.
    Since 95% (or more) poeple use IE, the Content-Type field is not much use (although you should still use it), since IE doesn't usually care about it, but if it finds HTML in the file, it will treat it as HTML (at least some versions, probably all) even if it's Content-Type: text/html.
    This goes against some RFC which means that technically, IE is not a browser, but that's a story for another day.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  3. #18
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Quote Originally Posted by -=SoKrA=-
    but if it finds HTML in the file, it will treat it as HTML (at least some versions, probably all) even if it's Content-Type: text/html.
    .
    You mean text/plain.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #19
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    >>You mean text/plain.
    Erm... Yeah... I could do...
    Well, even if I did, it wouldn't matter, because IE would display text/html anyway ... No wait, what did I mean?
    Better go to bed, It's past 1:00 AM and tomorrow I'm going on holiday.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  5. #20
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. General question why must of the servers written in c and not c++ ?
    By umen242 in forum Networking/Device Communication
    Replies: 3
    Last Post: 06-26-2008, 04:17 AM
  2. Processor Vendors for web servers
    By Lind in forum Tech Board
    Replies: 8
    Last Post: 10-08-2007, 05:22 AM
  3. Program to fetch MX servers
    By lopes in forum Windows Programming
    Replies: 1
    Last Post: 03-24-2006, 12:36 AM
  4. About Severs and Proxy Servers
    By bookworm in forum Tech Board
    Replies: 2
    Last Post: 06-13-2003, 03:37 AM
  5. irc servers
    By Sekti in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-28-2002, 09:23 AM