Closed Bug 1187402 Opened 10 years ago Closed 10 years ago

GET /rest/version HTTP/1.1 -> GET /rest.cgi/version HTTP/1.1

Categories

(Bugzilla :: Documentation, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: huruinan, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; .NET4.0E; .NET4.0C; Tablet PC 2.0; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; rv:11.0) like Gecko Steps to reproduce: I used following python codes header = {"Accept": "application/json"} bugzilla.request("GET", "/rest/version",'',header) res = bugzilla.getresponse() print res.status, res.reason print res.read() bugzilla.close() Actual results: python can't find the URL Expected results: I change "GET /rest/version HTTP/1.1" to "GET /rest.cgi/version HTTP/1.1" The python got the right respond. 200 OK {"version":"5.0"}
No idea which part of the documentation you are talking about. A URL would be helpful. :) Note that .htaccess has a specific rule for rest -> rest.cgi: RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE] So there is no need to specify rest.cgi yourself.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
I am talking about first example in the following page. https://bugzilla.readthedocs.org/en/5.0/api/core/v1/general.html This is the first example I have tried for bugzilla. The replacement rest to rest.cg is not enable by default. When I tried this example, I was so confused. Maybe we need to add a note to this problem.
(In reply to ryan from comment #2) > The replacement rest to rest.cg is not enable by default. It is enabled by default. This rule is in .htaccess by default.
You need to log in before you can comment on or make changes to this bug.