#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    USA
    Posts
    830
    Rep Power
    14

    IIS chokes on URLs with colons?


    I'm programming a script that pulls data out of the PATH_INFO environment variable. All of a sudden, when I try sending some data that includes colons (":") in the URL, IIS chokes and returns a 404 error. Bull****.

    Despite the fact that colons are permitted in the path portion of the URL, I tried encoding them and got the same result.

    What is the deal with this? Is there any way to make it work right?

    For example:
    http://www.example.com/script.cfm/blah/

    = fine

    ----------

    http://www.example.com/script.cfm/blah::blah/

    or

    http://www.example.com/script.cfm/blah%3A%3Ablah/

    = 404

    (both URLs work fine on Apache / Linux).
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    USA
    Posts
    830
    Rep Power
    14
    Since no one here showed any interest in responding to my post, I posted the same thing to a Microsoft newsgroup and this is the reply I got:
    Hi JMM,

    IIS does not permit colons in the URL. This is because the NTFS file system
    considers a colon to be a special character that's used to denote alternate
    streams within a file. If your example URL below were handled by the static
    file handler in IIS, it would attemps to open the stream called "blah"
    within a file called "blah" in the "script.cfm" directory under wwwroot.

    More specifically, without this limitation, if a client were to request
    http://www.example.com/script.cfm::$data, then the contents of the
    script.cfm file would get sent to the client instead of invoking ColdFusion
    to process script.cfm.

    If you want to prevent IIS from parsing your data, then put it either in the
    query string or the entity body. A colon would be allowed in either of
    those places.

    Thank you,
    -Wade A. Hilmo,
    -Microsoft
    What bull****.

IMN logo majestic logo threadwatch logo seochat tools logo