Articles of http headers

当在端口80请求时,nginx下载空文件(而不是redirect到端口443)

我的nginxnetworking服务器不行,他应该怎么做。 所有到服务器的http://请求都应该使用http 301redirect到https://,过去几天工作正常,直到停止工作而没有任何改变。 Nginx返回一个types为“application / octet-stream”的空文件和下面的内容(在sublime中可读): 0000 1204 0000 0000 0000 0300 0000 8000 0400 0000 0000 0500 ffff ff00 0004 0800 0000 0000 7fff 0000 0000 0807 0000 0000 0000 0000 0000 0000 01 首先,我试图删除该行 default_type application/octet-stream; 从我的nginx.conf,但它没有帮助。 http-response头返回 Status: 我从http://到https://的301redirect的服务器块如下所示 server { listen 80; listen [::]:80; server_name my.tld www.my.tld; return 301 https://$server_name$request_uri; } […]

如何禁用Sun服务器上的HTTP选项

用BURP发送一个 选项* HTTP / 1.0 请求Sun Web Server 7.0返回: HTTP / 1.1 200 OK 服务器:Sun-Java-System-Web-Server / 7.0 date:2010年2月3日(星期三)01:05:14 GMT 允许:HEAD,GET,PUT,POST,DELETE,TRACE,OPTIONS,MOVE,INDEX,MKDIR,RMDIR,COPY,CONNECT,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK,ACL,REPORT,VERSION-CONTROL,CHECKOUT,CHECKIN,退货,MKWORKSPACE,更新,标签,合并,基线控制,MKACTIVITY,search,订阅,取消,通知,投票,BDELETE,BCOPY,BMOVE,BPROPPATCH,BPROPFIND 和GlassFish Enterprise Server v2.1返回: HTTP / 1.1 200 OK X-Powered-By:Servlet / 2.5 服务器:Sun GlassFish Enterprise Server v2.1 允许:GET,HEAD,POST,PUT,DELETE,TRACE,OPTIONS date:2010年2月3日星期三01:10:10 GMT 我想修剪两个服务器上支持的HTTP选项,如下所示: 允许:GET,HEAD,POST,PUT 如何configuration两台服务器才能实现?

Apache HTTP:有条件地设置Last-Modified标头

我想用以下其中一个值来设置Last-Modifieddate: 如果请求标头具有If-Modified-Since值,请使用此值 否则使用当前date 我怎样才能configuration在Apache的httpd.conf ?

Web服务器将PDF文件作为错误的MIMEtypes提供

在升级到最新版本的Joomla之后,我正在从一个网站上下载的内容不正确。 示例页面: http : //www.pacificpolicy.org/index.php?option=com_content&view=article&id= 259: mic-paper&catid= 39: rokfeature 在第一次访问时,他们正在处理正确的内容处理,但任何进一步的访问PDF文件正在被加载为文本/ HTML(即在屏幕上显示文件的内容)。 如何强制浏览器在每次访问时正确加载PDF? 我对PHP&http头的知识是相当基本的,所以我可以使用一些帮助来诊断这个。 主机是一个LAMP服务器,Joomla是1.5.22,文档pipe理插件是Rubberdoc。 第二次访问的响应标题如下: Date: Thu, 16 Dec 2010 04:29:03 GMT Server: Apache/XXx X-Powered-By: PHP/xxx P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Etag: db71388c6fc952682ae2fd733d4b09c5 Content-Encoding: gzip X-Content-Encoded-By: Joomla! 1.5 Expires: Mon, 1 Jan 2001 00:00:00 GMT Cache-Control: no-store, no-cache, […]

Ironport X-Junk头

我的学校使用Ironport来过滤/监控networkingstream量。 我有点好奇,为什么它在所有的东西上都贴上了x-junk: header。 经过几次curltesting后,我发现页面上显示的内容和x-junk: header之间没有真正的联系。 这是我的卷毛请求:任何想法? Anchorage:~ khotchkiss$ curl -I google.com HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Sun, 06 Feb 2011 04:37:25 GMT Expires: Tue, 08 Mar 2011 04:37:25 GMT Cache-Control: public, max-age=2592000 Server: gws X-XSS-Protection: 1; mode=block Content-Length: 219 Age: 108 Via: 1.1 MC-IRONPORT.UNIVERSITY.LIBERTY.EDU:80 (IronPort-WSA/6.3.3-015) Connection: keep-alive X-Junk: xxxxxxxxxxxxxxxxxxxxxxx

强制连接closureslighttpd

我有一个M2M项目,发出以下标题。 HTTP/1.1 Accept-Language: zh-cn Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) Host: xxx.xxx.xxx.xxx:xxxx RANGE:bytes=0-1023 Connection: Keep-Alive Apache和ISS有connection : close在响应头中connection : close ,不pipe请求keep-alive 。 Lighttpd我假设实际上是正确执行,因为它确实保持连接活着,或不发送connection : close 。 我真的需要它来closuresM2M机器的连接。 我试过了 setenv.add-response-header = ( "connection" => "close" ) 但是这被忽略,无论如何强迫一个连接closures?

301redirect,规范问题

我为自己的网站devise了自己的“最新消息”页面,并且试图保持URL的清洁。 (例如)它应该看起来像这样: http://www.domain.com/21/this-is-a-clean-url/ 当有人链接到文章,他们有时会搞砸,做: http://www.domain.com/21/this-is-a-clean-url/#random-hash-tag 所以我一直在做的是寻找“ http://www.domain.com/21 ”和301(移动permantly)redirect到正确的url+添加一个规范元标记。 这是否过度? 我是否应该使用(302发现)标题 – 只是让规范标签告诉search引擎什么适当的文章的URL是? 处理这个问题的最好方法是什么?

meteor服务器unicode通道问题

当用Meteor (一个使用COMET进行实时推送的专用Web服务器)订阅名为“public”的频道时,我得到了所需的响应: <script>ch("public",0)</script> 当http请求是: GET /push/131530959548387383/xhrinteractive/public?nc=1315309595740 HTTP/1.1 但是,当我尝试订阅以英文和希伯来语命名的频道,例如:“tag-קוקאין”和http请求是: GET /push/1315309516300999786/xhrinteractive/tag-%D7%A7%D7%95%D7%A7%D7%90%D7%99%D7%9F?nc=1315309516590 HTTP/1.1 我得到了一个尴尬的回应 – 频道的名字变成了点: <script>ch("tag-…………", 0);</script> 负责计算标题的文件使用这个正则expression式: if($self->{'headerBuffer'}=~/GET\s+$::CONF{'SubscriberDynamicPageAddress'}\/([0-9a-z]+)\/([0-9a-z]+)\/([a-z0-9_\-\%\.\/]+).*?/i) { $self->{'subscriberID'}=$1; $self->{'mode'}=$2; my $persist=$self->getConf('Persist'); my $maxTime=$self->getConf('MaxTime'); $self->{'ConnectionTimeLimit'} = ($self->{'ConnectionStart'}+$maxTime) if ($maxTime>0); my @channelData=split('/',$3); my $channels={}; my $channelName; my $offset; foreach my $chandef (@channelData) { if($chandef=~/^([a-z0-9_\-\%]+)(.(r|b|h)([0-9]*))?$/i) { $channelName = $1; $channels->{$channelName}->{'startIndex'} = undef; if ($3) { $offset […]

IIS 7:特定文件的过期标题

我对根目录中的网站上的所有静态内容进行了此configuration: <configuration> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseExpires" httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" /> </staticContent> </system.webServer> </configuration> 现在我想给一个子目录中的特定文件和根目录中的favicon文件提供一个不同的expires头文件。 上述代码后,我正在尝试此configuration,但我得到一个服务器错误。 <location path=""> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseExpires" httpExpires="Tue, 19 Jan 2012 03:14:07 GMT" /> </staticContent> </system.webServer> </location> 也许任何人可以帮忙?

haproxy头重写为小写

我有一个haproxy服务器后面的自定义应用程序。 haproxy可以重写头部的情况吗? 例如,将http://www.company.com/ABC更改为http://www.company.com/abc 如果是这样,怎么样?