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

IE8 and Firefox Problem #4

Open
Daijobou opened this issue May 13, 2010 · 0 comments
Open

IE8 and Firefox Problem #4

Daijobou opened this issue May 13, 2010 · 0 comments

Comments

@Daijobou
Copy link

In IE8 very often captcha doesn't display.
In Firefox very often captcha doesn't full display: http://i43.tinypic.com/foluoh.jpg (height is 50)

More: http://github.com/kolanos/kohana-captcha/issues/issue/3/#issue/3

EDIT:

I have change ..\kohana\modules\captcha\classes\controller\captcha.php

comment out this line:

//$this->request->headers['Content-length'] = filesize($captcha);

Now its working in Opera, IE8 and Firefox.

EDIT2:

I have found this:

Output is that:

public function action_index($group = 'default')
{
    // Output the Captcha challenge resource (no html)
    // Pull the config group name from the URL
    $captcha = Captcha::instance($group)->render(FALSE);
    $this->request->headers['Content-Type'] = File::mime($captcha);
    $this->request->headers['Connection'] = 'close';
    //$this->request->headers['Content-length'] = filesize($captcha); // fix
    $this->request->response = $captcha;
}

Now i look in render(FALSE) => \modules\captcha\classes\captcha\basic.php
last line => return $this->image_render($html);

Now i look in image_render() => \modules\captcha\classes\captcha.php
here => $this->request->headers['Content-Type'] = 'image/'.$this->image_type;
Why? I can comment it out. :)

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

1 participant