Changeset 26f47cd441beeadb2ffc9a6ab7091595de431a0a

Show
Ignore:
Timestamp:
01/22/08 07:20:39 (10 months ago)
Author:
William McBrine <wmcbrine@gmail.com>
git-committer:
William McBrine <wmcbrine@gmail.com> 1201008039 -0500
git-parent:

[c8bd343a5c04238ee79615c84a8e6c112aee0ce3]

git-author:
William McBrine <wmcbrine@gmail.com> 1201008039 -0500
Message:

Check for an exact match to the share name, instead of "startswith".
This should fix the problems people had when one share name was a subset
of another, and it's also less work for the program.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • httpserver.py

    rc8bd343 r26f47cd  
    2929 
    3030    def do_GET(self): 
     31 
     32        basepath = unquote_plus(self.path).split('/')[1] 
    3133  
    3234        ## Get File 
    3335        for name, container in self.server.containers.items(): 
    34             #XXX make a regex 
    35             path = unquote_plus(self.path) 
    36             if path.startswith('/' + name): 
     36            if basepath == name: 
    3737                plugin = GetPlugin(container['type']) 
    3838                plugin.send_file(self, container, name)