Description of problem: For a DIY custom application, if the application server returns a 4xx status code, then the content returned back from the application server is getting overridden. Version-Release number of selected component (if applicable): diy-0.1 on production How reproducible: Always. Steps to Reproduce: 1. Create a diy application rhc app create -a diy1 -t diy-0.1 . 2. Add the attached python script to your git repo [say to diy1/diy directory] and start it on deployment (either modify the .openshift/action_hooks or you can ssh into the instance and run the python script). 3. git commit && git push 4. ssh $(rhc app show -a diy1 | grep "Git URL" | cut -f 3 -d ':' | cut -f 3 -d '/') 5. cd $OPENSHIFT_REPO_DIR/diy/ && python status400.py From your client run: curl -vvv $(rhc app show -a diy1 | grep "Public URL" | cut -f 2- -d ':') Actual results: The 400 http status code is returned back but the content is overlaid by apache's default error page. Expected results: The 400 http status code and page content is returned back to the caller. Additional info:
Created attachment 577805 [details] status 400 python sample
The ProxyErrorOverride On directive is causing the errors to get overriden. Bug created for forum post: https://www.redhat.com/openshift/community/forums/openshift/apache-captures-bad-requests-with-do-it-yourself-modules
Lets pull this one in to this sprint. Ram can you confirm this fix (and fix it in devenv) then work with Thomas to get it updated in int/stg/prod?
oh sorry, this one's assigned to Mrunal. So Mrunal, can you do this this sprint? If not let me know.
Submitted pull request - https://github.com/openshift/crankcase/pull/94
The new patch have not integrated to devenv_1809,So just keep on this status,I will test again when the new build come out.
I tested it on devenv_1810: step: 1.create an diy app 2.git push the status400.py to the app repo 3.stop this app #because some other progress occupied the 8080 port. 4.ssh on the app , 5.run the script The curl output: [root@localhost ~]# curl -vvv http://diy0-domaintest0002.dev.rhcloud.com/ * About to connect() to diy0-domaintest0002.dev.rhcloud.com port 80 (#0) * Trying 23.22.151.234... connected * Connected to diy0-domaintest0002.dev.rhcloud.com (23.22.151.234) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.21.7 (i386-redhat-linux-gnu) libcurl/7.21.7 NSS/3.13.3.0 zlib/1.2.5 libidn/1.22 libssh2/1.2.7 > Host: diy0-domaintest0002.dev.rhcloud.com > Accept: */* > < HTTP/1.1 400 Bad Request < Date: Thu, 31 May 2012 10:55:15 GMT < Server: BaseHTTP/0.3 Python/2.6.6 < Content-type: text/html; charset=UTF-8 < Vary: Accept-Encoding,User-Agent < Strict-Transport-Security: max-age=15768000, includeSubDomains < ProxyTime: D=6485 < Connection: close < Transfer-Encoding: chunked < <html> <head><title>void *status400;</title></head> <body><br/><h3>Custom 400 status code page</h3></body> </html> * Closing connection #0