Hi,

I tried to get the values using $rd->getHeader(). I got the following
results. Still I didn't get value for $rd->getHeader('ACCEPT')
(>>$_SERVER['HTTP_ACCEPT']) after ajax request in Agavi. Can u please
help me.

*I'm getting the following result before ajax request.*

* $_SERVER result
-----------------------------*

array(35) {

  ["HTTP_HOST"]=>

  string(9) "localhost"

  ["HTTP_USER_AGENT"]=>

  string(92) "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"

  *["HTTP_ACCEPT"]=>*

*   string(99) 
"text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"*

 *  *["HTTP_ACCEPT_LANGUAGE"]=>

  string(14) "en-us,en;q=0.5"

  ["HTTP_ACCEPT_ENCODING"]=>

  string(12) "gzip,deflate"

  ["HTTP_ACCEPT_CHARSET"]=>

  string(30) "ISO-8859-1,utf-8;q=

0.7,*;q=0.7"

  ["HTTP_KEEP_ALIVE"]=>

   . . .

<< remaining entries deleted>>



*$rd->getHeader('ACCEPT') Result
 ------------------------------------------------------*

string(99) "text/xml,application/xml,application/xhtml+xml,text/html;q=

0.9,text/plain;q=0.8,image/png,*/*;q=0.5"



* $rd->getHeaderNames() Result
---------------------------------------------------*

 array(10) {

  [0]=>
   string(4) "HOST"

  [1]=>
 string(10) "USER_AGENT"

  [2]=>
  string(6) "ACCEPT"

  [3]=>
  string(15) "ACCEPT_LANGUAGE"

  [4]=>
  string(15) "ACCEPT_ENCODING"

  [5]=>
  string(14) "ACCEPT_CHARSET"

  [6]=>
 string(10) "KEEP_ALIVE"

  [7]=>
  string(10) "CONNECTION"

  [8]=>
  string(6) "COOKIE"

  [9]=>
 string(17) "IF_MODIFIED_SINCE"

}

 * *

*I'm getting the following result after ajax request.*

 *$_SERVER result
------------------------------*

array(39) {

  ["HTTP_HOST"]=>

  string(9) "localhost"

  ["HTTP_USER_AGENT"]=>

  string(92) "Mozilla/5.0 (Windows; U; Windows NT

5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"

  *["HTTP_ACCEPT"]=>*

*  string(58) "text/javascript, text/html, application/xml, text/xml, */*"*

*  *["HTTP_ACCEPT_LANGUAGE"]=>

   string(14) "en-us,en;q=0.5"

  ["HTTP_ACCEPT_ENCODING"]=>

   string(12) "gzip,deflate"

  ["HTTP_ACCEPT_CHARSET"]=>

  string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.7"

  ["HTTP_KEEP_ALIVE"]=>

  string(3) "300"

  . . .

<< remaining entries deleted>>



*$rd->getHeader('ACCEPT') Result
 ---------------------------------------------------*

NULL



*$rd->getHeaderNames() Result
*-------------------------------------------------

NULL

array(0) {

}

Thanks,
Jeya

On Dec 21, 2007 10:53 AM, Veikko Mäkinen <[EMAIL PROTECTED]> wrote:

> Jeya Selvi R wrote:
> > Hello,
> >
> > I'm using agavi as a component in Joomla1.5 for my project.
> >
> > I am passing Ajax request to Agavi from Joomla. But when i try to
> > retrive the value for $_SERVER['HTTP_ACCEPT'],I am unable to get the
> > value in Agavi.
> >
> > I'm getting the $_SERVER['HTTP_ACCEPT']  value as "text/javascript"
> > before control is going to Agavi. Once the control is in agavi, this
> > value is emptied.
> >
> > How can I get the value for $_SERVER['HTTP_ACCEPT'] in Agavi?
> >
>
> Hi Jeya,
>
> All insecure headers (provided by the user/client) are only accessible
> through $rd->getHeader(). This is to protect you from using insecure
> data without validation.
>
>
> -veikko
>
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to