Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

[Bug Report] undefined header "Content-Type" for output the captcha challenge #1

Open
liaosankai opened this issue Apr 13, 2010 · 1 comment

Comments

@liaosankai
Copy link

Output the captcha challenge on captcha controller is working well on IE browser,but it seem get in trouble on Firefox or Chrome.So I do some fix as follow:

BEFORE:

$this->request->response = Captcha::instance($group)->render(FALSE);

AFTER:

$captcha = Captcha::instance($group)->render(FALSE);
$this->request->headers['Content-Type'] = File::mime($captcha);
$this->request->headers['Content-length'] = filesize($captcha);
$this->request->response = $captcha;

It is working well on all browsers :)

@kolanos
Copy link
Owner

kolanos commented Apr 13, 2010

I've commited this change ff9685e, but it will need to be tested. Ideally the headers should be handled by the class and not the controller based on the captcha type, I magine this breaks text-based captcha.

kohenkatz pushed a commit to YadYehuda/kohana-captcha that referenced this issue Dec 21, 2012
Changes required for me to get it to work in Kohana 3.2 (and master from GitHub)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants