large .js files).
We will need this when we start getting large js
files generated when using the closure library.
Change-Id: Iaecacd54c3d08637918b1afd420fb90f1a84aabb
When you go to /setup on Windows, it currently checks
the "localhostAuthorized" function that checks your
UserID with os.Getuid() and than check with the local
and remote address to see if you are allow. In Windows
os.Getuid will always equals -1 and the function default
to unallowed. On darwin, it does check for uid but
afterward only cares if the local and remote addresses
are loopback addresses.
So, I changed this function so that when the os.Getuid
is not avalaible on the platform and returns -1, it does
the same check as in darwin.
I also modified the "isLocalhost" function to use the
helper function "net.IsLoopback" instead of string matching.
Since, I already had parsed addresses and had to call
AddPairUserId, I checked if it wouldn't be simpler to
pass net.Addr directly instead of strings and reconvert
them afterward. It seemed after looking at all the code
that called this function that it simplified calls quite
a bit to do so.
Finally, I modified "netutil.Localhost" for it to return
the first IP it finds instead of the string representation
of the first IP enclosed in square brackets. Since the square
brackets around the IP are only necessary in a TCPAddr, it
would be simplier and more robust for the user to directly
print TCPAddr instead of appending this string to a post.
Change-Id: Id79de6bebd6380f877074211c0d260782058765f
to restart camli properly
This change adds the functionality to find the path to
the currently running executable, so that camlistore
can be restarted without à priori knowledge of cwd.
It should work for linux, netBSD and freeBSD, and it
might work for openBSD.
The naive (os.Args[0]) approach is still used with
darwin.
Reference: https://codereview.appspot.com/6736069/
Change-Id: Icc9fc2b4e1b3542cfbe6c457c1fefbe762eff2f1
This change allows to find all roots (permanodes with the
"camliRoot" attribute) from the search.html ui page.
To achieve that, func (x *Index) SearchPermanodesWithAttr
now uses a prefix string without the query part if the
query is "".
http://code.google.com/p/camlistore/issues/detail?id=35
Change-Id: I396fba683e6e7b2296d1f0df8009c07e3c2cd09d