Google Code的SVN目录直接显示HTML

2010-08-25 15:27:45 +08:00
 est
http://sublime-text-community-packages.googlecode.com/svn/index.html

类似这种,见到好多次了。。。是怎么做到的?

自己svn commit了一个 html 上去看到的是源码。。。囧。。。。
5176 次点击
所在节点    Google
8 条回复
Livid
2010-08-25 15:37:31 +08:00
fatty:~ livid$ curl -I http://sublime-text-community-packages.googlecode.com/svn/index.html
HTTP/1.1 200 OK
Date: Wed, 25 Aug 2010 07:35:55 GMT
Server: Apache
Last-Modified: Wed, 25 Aug 2010 06:28:47 GMT
ETag: "1119//index.html"
Accept-Ranges: bytes
Expires: Wed, 25 Aug 2010 07:38:55 GMT
Content-Length: 5145
Content-Type: text/html
Age: 87
Cache-Control: public, max-age=180
est
2010-08-25 16:39:27 +08:00
@Livid 我commit上去的都是这样的。。。

$ curl -I "http://zxn0.googlecode.com/svn/docs/A%20Periodic%20Ta
ble%20of%20Visualization%20Methods/index.htm"
HTTP/1.1 200 OK
Date: Wed, 25 Aug 2010 08:38:53 GMT
Server: Apache
Last-Modified: Wed, 21 Jan 2009 14:16:02 GMT
ETag: "47//docs/A Periodic Table of Visualization Methods/index.htm"
Accept-Ranges: bytes
Expires: Wed, 25 Aug 2010 08:41:53 GMT
Cache-Control: public, max-age=180
Content-Length: 74792
Content-Type: text/plain

text/plain。。。郁闷。。。
Livid
2010-08-25 16:42:36 +08:00
如果扩展名改成 html 呢?
est
2010-08-25 16:44:51 +08:00
@Livid 一样的text/plain
Livid
2010-08-25 16:47:42 +08:00
svn propset svn:mime-type text/html `find . -name "*.html" -print | grep -v .svn`
est
2010-08-25 16:49:34 +08:00
est
2010-08-25 16:49:54 +08:00
@Livid 动作真快 -_-!
Livid
2010-08-25 16:55:21 +08:00
握手握手

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/2008

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX