V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
est
V2EX  ›  Google

Google Code的SVN目录直接显示HTML

  •  
  •   est · 2010-08-25 15:27:45 +08:00 · 5151 次点击
    这是一个创建于 4965 天前的主题,其中的信息可能已经有所发展或是发生改变。
    http://sublime-text-community-packages.googlecode.com/svn/index.html

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

    自己svn commit了一个 html 上去看到的是源码。。。囧。。。。
    8 条回复    1970-01-01 08:00:00 +08:00
    Livid
        1
    Livid  
    MOD
       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
        2
    est  
    OP
       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
        3
    Livid  
    MOD
       2010-08-25 16:42:36 +08:00
    如果扩展名改成 html 呢?
    est
        4
    est  
    OP
       2010-08-25 16:44:51 +08:00
    @Livid 一样的text/plain
    Livid
        5
    Livid  
    MOD
       2010-08-25 16:47:42 +08:00
    svn propset svn:mime-type text/html `find . -name "*.html" -print | grep -v .svn`
    est
        6
    est  
    OP
       2010-08-25 16:49:34 +08:00
    est
        7
    est  
    OP
       2010-08-25 16:49:54 +08:00
    @Livid 动作真快 -_-!
    Livid
        8
    Livid  
    MOD
       2010-08-25 16:55:21 +08:00
    握手握手
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2536 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:43 · PVG 23:43 · LAX 08:43 · JFK 11:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.