uri

REST best-practice for overlong URIs

I have REST services which should receive really long queries via GET. Say for example I want to query a service with many geographical coordinates to find out something about all this coordinates. 1) My first thought was to use long URIs and increase the max URI length of the servlet container. It would look like this: GET http://so...

What do you call the entire first part of a URL?

If I have a URL like: http://www.example.com:9090/test.html Then I know that www.example.com is the host name, but what do you call http://www.example.com:9090? Is there some kind of established name for that? ...

Characters to strip out in a SEO Clean Uri

I'm using asp.net/C# and I'm looking to create unique(?) uris for a small CMS system I am creating. I am generating the uri segment from my articles title, so for example if the title is "My amazing article" the uri would be www.website.com/news/my-amazing-article There are two parts to this. Firstly, which characters do you think I n...

Is it right to say that paths are represented as URI while web-addresses are represented as URL?

I am confused by Apple's documentation about the NSURL class. In NSURL, they say the following: NSURL understands URLs in style of RFC 1808, 1738 und 2732 NSURL understands URIs in style of RFC 2396 Also they say that the RFC 2396 URI are paths. Now what's the difference here? Isn't a path also an URL? I mean, it's an location or n...

Where is the difference between locating a ressource and identifying a ressource?

Is there any? (talking about URI = identifying, and URL = locating). Isn'g both the same thing? ...

Why is URN one of more popular formats used to uniquely identify the resource?

I somewhat understand that URNs are used to provide unique and location independent name for the resource. Yet I fail to see their usefulness and how exactly they work: a) In order for URN to really be unique, there would have to be some central authority (similar to authority for domain names) where we could register URNs and that way ...

When would we choose Public identifier over System identifier to locate DTD file?

Hi 1) FPIs can be used to identify DTD files. Since as far as I can tell, FPIs are somewhat similar to URNs in that they uniquely identify the resource ( DTD file ), then why don’t we use URNs instead of FPIs to locate DTDs? In other words, what makes FPIs more efficient in identifying DTD files? 2) I also don’t understand the usefuln...

why does colon ":" in Uri passed to Uri.MakeRelativeUri cause an exception???

Hi, The following line of code gives an exception. Is this a bug in the framework? If not what approach could I take instead? It seems to be the ":" (colon) that causes in the issue, however I do see such a URI working on production websites ok (i.e. seems to be a valid URI in the real world) Uri relativeUri = new Uri("http://test.c...

C# question - how do I convert a PageURI & Href to an absolute URL/URI?

Hi, How do I convert a PageURI & Href to an absolute URL/URI in C#? i.e. I am scanning a web page at a given PageURI and in the HTML have link/node with a HREF, and want to translate this HREF into a valid absolute URI. Background - note the trouble I was having here ...

c#: Get just the domain name from a URL?

Hi there, I am trying to extract just the domain name from a URL string. I almost have it... I am using URI I have a string.. my first thought was to use Regex but then i decided to use URI class http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CAgQFjAA&url=http://www.test.com/&rct=j&q=test&ei...

Finding the path of a mounted network share on Mac OS X

I'd like to find out where a network share is mounted when the mount command fails like this: $ mkdir ~/share $ mount_afp afp://server/share ~/share mount_afp: the volume is already mounted This looked promising... $ mount ... snip ... afp_000000004oMw0q76003DF78u-1.2d000006 on /Volumes/share-1 (afpfs, nodev, nosuid, mounted by usern...

What's the best way to access a URI variable after a hashtag from php?

I have javascript updating my URI as below: /index.php?page=list#page=news But I would like to make page=news accessible somehow from my server so that when the URI is copied and pasted, it would go to the news page. What is the best way to do this ? I tried $_SERVER['REQUEST_URI'] but everything stored in $_SERVER is before the hash...

Is the HTML <base> tag also honored by scripting and CSS?

The base HTML element provides a base for relative URIs in the HTML. Must JavaScript and CSS also honor it for relative URIs issued in them e.g. JavaScript location.href = "mypage.htm" or CSS h4{ background-image: url(myimage.gif) }? Any browser. ...

What is the semicolon reserved for in URLs?

The RFC 3986 URI: Generic Syntax spec lists a semicolon as a reserved (sub-delim) character: reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" What is the reserved purpose of the ";" of the semicolon ...

PHP Zend Framework - How to Get Request URI Fragment from Request Object?

Hi, Say e.g. i have a URI http://127.0.0.1/somecontroller/someaction#12345 that takes me to the someAction() action of the someController controller. From there, i am able to retrieve the Request object via $this->getRequest(). i am also able to retrieve various information regarding the URI from the Request object. But, how can i ret...

Is an e-mail address a URI?

I've tried to figure out whether the format of an e-mail address can be said to comply with the definition of a URI or not, but I've found no explicit confirmation of this so far. I hope someone can provide me with some insight here. Thanks in advance :) ...

Escaping & in a URL

I am using jsps and in my url I have a value for a variable like say "L & T". Now when I try to retrieve the value for it by using request.getParameter I get only "L". It recognizes "&" as a separator and thus it is not getting considered as a whole string. How do I solve this problem? ...

REST URI definition

Hi, I'm reading REST and nearly ready to try it but I can't get comfortable with a coupel of things. The first is to do with defining the URI's. The scenario is an existing site with products for sale. You can view data in a number of views, driling down a hierarchy, but basically cat1/cat/ products, or cat 2/cat3/products or anycombin...

How to get odd numbers of parameters in Zend Framework?

Greetings everyone Using the request object, I can't get a sole value as in this URI: http://mydomain.com/controller/action/value1 Using $request->getParams() is not returning the value1. Output: array([controller] => 'controller', [action] => 'action') The key is missing. The issue itself is quite simple and I could parse the U...

Ruby: Checking if URI is HTTPS?

I would like to check if the URI will need SSL authentication: url = URI.parse("http://www.google.com") # [some code] if url.instance_of? URI::HTTPS http.use_ssl=true http.verify_mode = OpenSSL::SSL::VERIFY_NONE end However, those few lines throw the following error.. /usr/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is...