Skip to content
Snippets Groups Projects
Commit 16375f4e authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[BUGFIX] Send sane HTTP response in showpic on error

Currently, if showpic.php requests fail, exceptions are thrown. Those are
usually converted to a HTTP response 500 (internal server error) by the
production exception handler. Crawlers react on 500 by trying to index
the resource again later.

This is changed to now set specific response codes. If the paramters are
incorrect or broken, an 410 (Gone) will be sent, informing users and
crawlers that the resource is not available under this URL. Crawlers
like googleBot will then stop requesting the resource.

In case all parameters are ok, but the image itself is not found, a 404
will be sent to the client. Crawlers will try to index the resource
again only if there are still links pointing to the resource.

Change-Id: I606937fa9953b88be5edf940201e0153223ae0e6
Fixes: #39052
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/12867
Reviewed-by: Mario Rimann
Reviewed-by: Ernesto Baschny
Tested-by: Anja Leichsenring
Reviewed-by: Anja Leichsenring
Reviewed-by: Marcus Krause
Tested-by: Marcus Krause
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent 40871b96
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment