Job Failed with Error Bad HTTP response 301/302/307

Follow

Applies to:
Zend Server 6.3, 7.0
Jobqueue Feature

Resolved in:
Zend Server 8.0

Summary

When a URL is redirected, a Browser will load a new URL and show the page. This also works from CURL and other PHP HTTP client facilities.

With Jobqueue feature, a backend service is calling the HTTP target URLs, and older versions cannot manage non-HTTP 200 (OK) responses and stops the job with a failure such as "Bad HTTP response 302". Similar error statuses can be 301 and 307.

Workaround

This is a limitation of older Jobqueue service HTTP implementation which aims for performance, and full control on final Jobqueue Document Root where all scripts should return HTTP 200 (OK). You can fix the target web server to return content instead of redirection, or you can fix the Job target URL, which is easier, after observing the original request within a browser and replacing with a new target URL which was redirected to.

Once you upgrade to Zend Server 8.0 and up, you do not need to workaround the problem since Jobqueue service knows how to deal with redirect statuses.

Have more questions? Submit a request

Comments

Powered by Zendesk