Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from PiotrSikora/403

Use "403 Forbidden" instead of "400 Bad Request".
  • Loading branch information...
commit 148e58ea994e97ecc0fe084f5bd237fa762aebf8 2 parents 1610680 + 65379bb
@igrigorik authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  README.md
  2. +1 −1  static/index.html
  3. +1 −1  turk/turk.go
View
2  README.md
@@ -18,7 +18,7 @@ Verifies if the provided URL is allowed to be crawled by your User-Agent. Pass i
< Location: http://www.google.com/
### $ curl -v http://canicrawl.appspot.com/check?url=http://google.com/search
- < HTTP/1.0 400 Bad Request
+ < HTTP/1.0 403 Forbidden
< Content-Length: 23
{"status":"disallowed"}
View
2  static/index.html
@@ -79,7 +79,7 @@ <h3 id="-curl-v-http-canicrawl-appspot-com-check-url-http-www-google-com-">$ cur
<h3 id="-curl-v-http-canicrawl-appspot-com-check-url-http-www-google-com-search">$ curl -v http://canicrawl.appspot.com/check?url=http://google.com/search</h3>
-<pre><code>&lt; HTTP/1.0 400 Bad Request
+<pre><code>&lt; HTTP/1.0 403 Forbidden
&lt; Content-Length: 23
{"status":"disallowed"}
</code></pre>
View
2  turk/turk.go
@@ -70,7 +70,7 @@ func handler(w http.ResponseWriter, r *http.Request) {
}
resp, _ := json.Marshal(reply)
- w.WriteHeader(400)
+ w.WriteHeader(http.StatusForbidden)
w.Write(resp)
return
}
Please sign in to comment.
Something went wrong with that request. Please try again.