est
V2EX  ›  Google

Google Code的SVN目录直接显示HTML

  •  
  •   est · Aug 25, 2010 · 6289 views
    This topic created in 5916 days ago, the information mentioned may be changed or developed.
    http://sublime-text-community-packages.googlecode.com/svn/index.html

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

    自己svn commit了一个 html 上去看到的是源码。。。囧。。。。
    8 replies  •  1970-01-01 08:00:00 +08:00
    Livid
    Livid
    MOD
    PRO
    Aug 25, 2010
    1
    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
    est
    OP
    Aug 25, 2010
    2
    @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
    Livid
    MOD
    PRO
    Aug 25, 2010
    3
    如果扩展名改成 html 呢?
    est
    est
    OP
    Aug 25, 2010
    4
    @Livid 一样的text/plain
    Livid
    Livid
    MOD
    PRO
    Aug 25, 2010
    5
    svn propset svn:mime-type text/html `find . -name "*.html" -print | grep -v .svn`
    est
    est
    OP
    Aug 25, 2010
    7
    @Livid 动作真快 -_-!
    Livid
    Livid
    MOD
    PRO
    Aug 25, 2010
    8
    握手握手
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2685 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 13:12 · PVG 21:12 · LAX 05:12 · JFK 08:12
    ♥ Do have faith in what you're doing.