wplayer

Check-in [523deb309d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bring up HTTPS
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:523deb309d551f84bf5c225a668b5520f112a6d89ebd8361ded0a318cf1763fb
User & Date: ajv-899-334-8894@vsta.org 2016-02-03 19:34:40
Context
2016-02-06
19:02
Logins and cookies check-in: 26103392e4 user: ajv-899-334-8894@vsta.org tags: master, trunk
2016-02-03
19:34
Bring up HTTPS check-in: 523deb309d user: ajv-899-334-8894@vsta.org tags: master, trunk
19:05
Trying to keep Tin browser on Android to keep playing when it's in background w. screen off. Didn't help, but I'm leaving it in for now. check-in: 58ddb4e0b6 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to .gitignore.

1
2

*.pyc
css



>
1
2
3
*.pyc
css
certs

Changes to chore/server.py.

50
51
52
53
54
55
56
57
58

59
60





61
62
63






    # Invoke this if you want web server interface(s)
    def start_http(self):

	# Run HTTP.  All activity is rooted from HTTP transactions
	#  coming in.
	for (proto, cfg) in self.config["serve"]:
	    port = cfg.get("port")
	    if not port:

		port = 443 if (proto == "https") else 80
	    web = www.HTTP(proto, cfg, self.apphandler, self)





	    self.servers.append(web)
	    web.run()













|
<
>
|

>
>
>
>
>
|
<

>
>
>
>
>
50
51
52
53
54
55
56
57

58
59
60
61
62
63
64
65
66

67
68
69
70
71
72

    # Invoke this if you want web server interface(s)
    def start_http(self):

	# Run HTTP.  All activity is rooted from HTTP transactions
	#  coming in.
	for (proto, cfg) in self.config["serve"]:
	    print "start", proto


	    # Build a web server
	    web = www.HTTP(proto, cfg, self.apphandler, self)

	    # Give it a thread
	    t = threading.Thread(target=web.run)

	    # Keep track (mostly for debugging)
	    self.servers.append( (t, web) )


	    # Spin up the thread
	    t.start()

	print "http server(s) started"

Changes to chore/www.py.

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
...
119
120
121
122
123
124
125

126
127
128
129
130
    #  and interfaces
    c.fields0.add("serve")
    c.subconfig.add("serve")
    c.onearg.add("serve")
    c.mults0.add("serve")

    # Config port, which network interface, and SSL stuff
    c.fields1.update( ("port", "iface", "publicCert", "publicKey") )

    # Port is numeric
    c.ints.add("port")

    # These take only one argument
    c.onearg.update( ("serve", "iface", "publicCert", "privateKey") )

................................................................................
	    addr = get_ip_address(ifname)
	else:
	    addr = ""
	s.bind( (addr, port) )
	s.listen(20)

	# Endless service loop

	while True:
	    conn,tup = s.accept()
	    t = threading.Thread(target=self.launch, args=(conn,tup))
	    t.start()








|







 







>





23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
...
119
120
121
122
123
124
125
126
127
128
129
130
131
    #  and interfaces
    c.fields0.add("serve")
    c.subconfig.add("serve")
    c.onearg.add("serve")
    c.mults0.add("serve")

    # Config port, which network interface, and SSL stuff
    c.fields1.update( ("port", "iface", "publicCert", "privateKey") )

    # Port is numeric
    c.ints.add("port")

    # These take only one argument
    c.onearg.update( ("serve", "iface", "publicCert", "privateKey") )

................................................................................
	    addr = get_ip_address(ifname)
	else:
	    addr = ""
	s.bind( (addr, port) )
	s.listen(20)

	# Endless service loop
	print "Handler for", self.proto, "started on", addr, port
	while True:
	    conn,tup = s.accept()
	    t = threading.Thread(target=self.launch, args=(conn,tup))
	    t.start()