Skip to content

Commit

Permalink
Publish release 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alberthier committed Jun 3, 2016
1 parent ca90928 commit 717bf77
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-webui",
"version": "1.2.0",
"version": "1.3.0",
"authors": [
"Éric ALBER <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-webui",
"version": "1.2.0",
"version": "1.3.0",
"description": "A web user interface for git",
"main": "index.js",
"scripts": {
Expand Down
18 changes: 17 additions & 1 deletion release/libexec/git-core/git-webui
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ IS_WINDOWS = platform.system() == "Windows"
allowed_hosts = ["127.0.0.1", "localhost"]


class HTTPServerIPng(HTTPServer):
def __init__(
self, server_address, RequestHandlerClass,
bind_and_activate=True):
if not isinstance(server_address,tuple) or len(server_address) < 2:
raise TypeError("server_address must be a tuple (address,port)")

address_info = socket.getaddrinfo(server_address[0],
server_address[1],
0, 0, socket.IPPROTO_TCP)[0]

self.address_family = address_info[0]
HTTPServer.__init__(self,address_info[4],
RequestHandlerClass,
bind_and_activate)



class WebUiRequestHandler(SimpleHTTPRequestHandler):
Expand Down Expand Up @@ -298,7 +314,7 @@ if __name__ == '__main__':
httpd = None
while httpd is None:
try:
httpd = HTTPServer((host, port), WebUiRequestHandler)
httpd = HTTPServerIPng((host, port), WebUiRequestHandler)
except socket.error as e:
if args.port is not None:
sys.stderr.write("Port {} is already in use, try another one\n".format(port))
Expand Down

0 comments on commit 717bf77

Please sign in to comment.