• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

cURL Simple Question

When I give "http://www.gsp" to cURL, it gives me the page from "http://www.gps.com". I want to disable this behaviour (adding .com to invalid urls).
0
shellex
Asked:
shellex
4 Solutions
 
Xyptilon2Commented:
I cannot reproduce this unfortunately, perhaps a work around is to request the http server response and treat the 404 as a condition to trigger code?
0
 
Marcus BointonCommented:
Are you using a search-enhanced DNS like OpenDNS? You won't get a 404 from a server that doesn't exist.
0
 
Steve BinkCommented:
Another 2 cents: I don't believe this is a function of curl.  I do know that some ISPs automatically put in an enhanced DNS without informing the customers.  I had the same thing when I opened a new account with Time-Warner/Roadrunner.  Check with your provider, and check the configuration for the DNS resolver on the client machine.
0
 
Aaron TomoskyTechnology ConsultantCommented:
are you using CURLOPT_PROXY by chance? If so, your proxy could be appending the .com.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now