php - building REST API - long header -
i'm building api.. think server sends quite long header compared other "apis"..
http/1.1 200 ok date: thu, 30 jun 2011 19:51:22 gmt server: apache/2.2.16 (debian) x-powered-by: php/5.3.3-7+squeeze1 set-cookie: phpsessid=dv1nrjrd47qurff4u9tn8afa84; path=/ expires: thu, 19 nov 1981 08:52:00 gmt cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 pragma: no-cache vary: accept-encoding content-length: 0 connection: close content-type: text/html
just want know if there disadvantage of regarding safety?
edit
yay..! i'm down this
http/1.1 200 ok date: thu, 30 jun 2011 20:51:18 gmt server: apache content-length: 0 connection: close content-type: application/json
there no appreciable disadvantage in term of permormance send these header client. client should never cache response returned web service call since client not browser.
you start session (see phpsessid cookie) , if not useful client, simple don't start session
i tend hide version of apache , php security reason.
hide apache version: servertokens prod in httpd.conf file
hide php version: expose_php = off in php.ini
restart apache
Comments
Post a Comment