newbie: HTTP and URIs

G

Guest

Hi,

I'm quite new to this, so please excuse trivial questions:

- Is there any function (int the .net framework) that gives me an
enumeration of all URIs in a http stream (passed as e.g. a string)? If not,
how could I achieve such a thing?

- Really trivial, but to make sure: What does the string "/..../" in an URL
mean? I'd suspect some directory operation, but I dunno exactly...

- I'm currently using the HttpUtility.UrlDecode() function to decode some
http URIs and one thing stroke me in particular: The string
[...]"test.exe?/c+xtsr" is decoded to "test.exe?/c xtsr", missing the "+".
When I use the System.Uri class for the decoding the "+" remains....Does
anyone know why?

Thanks for reading till end and thanks in advance

Peter
 
K

Kevin Spencer

Hi Peter,

No question is trivial if you don't know the answer to it! :)
- Is there any function (int the .net framework) that gives me an
enumeration of all URIs in a http stream (passed as e.g. a string)? If
not,
how could I achieve such a thing?

Not sure what you mean by this. You can find URLs in an HTML document by
using Regular Expressions. The HTML document is a string.
- Really trivial, but to make sure: What does the string "/..../" in an
URL
mean? I'd suspect some directory operation, but I dunno exactly...

Is that the exact string you saw in a URL? I've never seen it before.

The following link to the W3C should help":

http://www.gbiv.com/protocols/uri/rfc/rfc3986.html
- I'm currently using the HttpUtility.UrlDecode() function to decode some
http URIs and one thing stroke me in particular: The string
[...]"test.exe?/c+xtsr" is decoded to "test.exe?/c xtsr", missing the "+".
When I use the System.Uri class for the decoding the "+" remains....Does
anyone know why?

The "+" character is a URL-Encoding for a space (which is an illegal URL
character).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

Peter Schmitz said:
Hi,

I'm quite new to this, so please excuse trivial questions:

- Is there any function (int the .net framework) that gives me an
enumeration of all URIs in a http stream (passed as e.g. a string)? If
not,
how could I achieve such a thing?

- Really trivial, but to make sure: What does the string "/..../" in an
URL
mean? I'd suspect some directory operation, but I dunno exactly...

- I'm currently using the HttpUtility.UrlDecode() function to decode some
http URIs and one thing stroke me in particular: The string
[...]"test.exe?/c+xtsr" is decoded to "test.exe?/c xtsr", missing the "+".
When I use the System.Uri class for the decoding the "+" remains....Does
anyone know why?

Thanks for reading till end and thanks in advance

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top