HTTP return code 404 on WResource
Added by Markus Raabe over 1 year ago
Hello,
I am updating some old application from Wt 4.3 to 4.8 (also changing the server).
A link with a WResource is defined for a WPushButton. Clicking the button a 404 not found reponse is returned.
A log("notice") message in WResource::handleRequest is not shown in the logfile, so it seems this is not called.
In the constructor of the Resource only suggestFileName is called, no further methods for the resource are called. The fcgi server is used.
The same code did work using Wt 4.3 (but server configuration could have an effect too).
Any idea, what the problem can be?
Thanks
Markus
Replies (2)
RE: HTTP return code 404 on WResource - Added by Markus Raabe over 1 year ago
The problem seems to be that the webserver is asked for the resource and not the application:
"GET /calc/xxxx.fcgi/gearReport.pdf?wtd=nbllIMYtyI4eolTl&request=resource&resource=oh80exp&ver=1 HTTP/2.0" 404
That did not happen with Wt 4.3. So far I do not understand what has changed...
RE: HTTP return code 404 on WResource - Added by Markus Raabe over 1 year ago
If I don't call suggestFileName the report is generated. Then the filename of the PDF is set to the application name and is not used in the GET request.
If suggestFileName is called the filename is used in the request and the apache server returns a 404 error.