url

Java HttpURLConnection doesn't connect when I call connect()

Hello, I'm trying to write a program to do automated testing on my webapp. To accomplish this, I open up a connection using HttpURLConnection. One of the pages that I'm trying to test performs a 302 redirect. My test code looks like this : URL currentUrl = new URL(urlToSend); HttpURLConnection connection = (HttpURLConnection) curr...

C++ Resolve a host IP address from a URL

How can I resolve a host IP address, given a URL in Visual C++? ...

Rewrite an URL and also block the file extension?

Is it possible to rewrite an url and also block the file extension?. eg: if I have `http://www.example.com/search.php?...` can I rewrite it to `http://www.example.com/search?` ? but, blocking the access to the .php file, normally I can access with both ways, with and without the file extension, but I want it to show an error page...

why do you need to encode urls?

Why do you need to encode urls? Is there a good reason why you have to change every space in the GET data to %20? ...

i need to pass url var in the scr of a iframe

i need to know how to pass everything after the .php part in this link "http://wreckedclothing.net/help/[email protected]&amp;t=985559" to a iframe on the same page. "hosted on the same site" like this "<iframe> src="http://www.wreckedclothing.net/[email protected]&amp;t=985559" fram...

django: filtering a object-list

I've got a list of objects (properties for rent, in this case) that I am listing, the list needs to be filterable by a handful of criteria (max price, area, n_bedrooms ...) and I figured I could do it like this: (r'^price:(?P<price_min>\d+)?-(?P<price_max>\d+)?/$', property_list) This works, and allows urls like price:300-600/ to do t...

Receiving a 500 internal server error when I have a '%' symbol in the query string

I am trying to diagnose a problem that a client site has come across. Basically when you do an address search on their website you can specify a '%' symbol for wildcard searches. For example you can search for Be% to return Belfast etc. This queries the database and then redirects you to the results page, passing the search criteria i...

Method return type String is not a String

First of all, my target here is to read from a URL, parse it, and take information from it and give it to another method sendMessage which then sends it to an IRC client. I haven't been doing java long so I'm adapting things I code I find on the internet. The below methods work when they are declared in their own class file, and run by p...

How to pass a url as a parameter to a handler in Django?

A project I'm currently working on has a sort of proxy functionality where users can browse to another URL through the site. I was hoping the URL could be something like this: www.mydomain.com/browser/[URL here] However I'm having trouble capturing a URL as a parameter like this. I think my inexperience with regex is failing me her...

Encrypt the song url in flex audio player

HI am new to AMFPHP. am creating flex audio player. Whenever am playing the song in my player. the song url will be displayed by the use of FIREBUG addons.. How can i encrypt and decrypt that url using AMFPHP or PHP. Some flash audio players done this job using AMFPH.. Edit/Delete Message ...

Regular Expression - replace word except within a URL/URI

Writing a globalization module for a web application and I need a regexp to replace all instances of a word with another word (the translation) - except - words found within a URL/URI. EDIT: I forgot to mention that I'm using Ruby, so I can't use 'Lookbehind' ...

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

How to get current URL in Rails?

How can I get current absolute URL in my Rails view? The request.request_uri gives me only relative URL. ...

Java: how to get a File from an escaped URL?

I'm receiving an URL that locates a local file (the fact that I receive an URL is not in my control). The URL is escaped validly as defined in RFC2396. How can I transform this to a Java File object? Funnily enough, the URL getFile() method returns a String, not a File. I've created a directory called "/tmp/some dir" (with a spacing ...

Using an url with & char and the rest of special chars

Hi, I'm trying to work with special chars in URLs but I have some trouble on undertand what I shuld do to get it works correctly. I've saw URLs like: http://www.last.fm/music/Simon+&amp;+Garfunkel http://www.last.fm/music/小林武史 works perfectly on Last.FM, but how can I do that? I've asked at this question some way to do it, but has s...

How to use QueryString

How can I have different URL ids like www.somewebsite.com/index?theidentifier=34 only in ASP.NET MVC not Webforms. ...

RichEdit VCL and URLs. Workarounds for OnPaint Issues.

So, issue is with the thing Delphi progies scare to death - Rich Edit in Windows ( XP and pre-XP versions ). Situation: I have added EM_AUTOURLDETECTION in OnCreate of form. Target -> RichEdit1. Then, I have form, that is "collapsed" after showing form. RichEdit Control is sattic, visible and enabled, but it is "hidden" because form wi...

Lighttpd: How to password-protect URLs matching regex

Hi, Is there a convenient way to password-protect URLs which match a certain pattern in Lighttpd? I thought about matching regex, but any other creative solution will be nice. NOTE : I'm not looking for a way to password-protect a directory, beacuse the URLs I want to protect aren't confined to a certain directory structure. Adam ...

Generate URL in Grails

I need to pass a correct URL to a javascript function in one of my GSPs. I don't want to just hard code it just in case the mappings for that URL ever change. I know in Rails I would use the url_for method such as: <%= url_for :controller => 'something', :action => 'edit', :id => 3 %> How would I do this in Grails? I can't seem to ...

How can I map URLs to filenames with perl?

In a simple webapp I need to map URLs to filenames or filepaths. This app has a requirement that it can depend only on modules in the core Perl ditribution (5.6.0 and later). The problem is that filename length on most filesystems is limited to 255. Another limit is about 32k subdirectories in a single folder. My solution: my $filena...