File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ def get_candidate_list(client_socket):
4949
5050 msg = 'GET /candidates HTTP/1.1\r \n ' \
5151 f'Host: { SERVER_ADDRESS } :{ SERVER_PORT } \r \n ' \
52- 'Content-Length: 31\r \n ' \
53- '\r \n ' \
54- '{\r \n ' \
55- f'"key": "vote"\r \n ' \
56- '}'
52+ # 'Content-Length: 31\r\n' \
53+ # '\r\n'
54+ # '{\r\n'
55+ # f'"key": "vote"\r\n ' \
56+ # '}'
5757
5858 client_socket .send (msg .encode ())
5959
@@ -87,10 +87,10 @@ def main():
8787 # if já voltou:
8888 # get_result()
8989 # if não votou:
90+ print (get_candidate_list (client_socket ))
9091 # post_vote()
9192 #get_result()
9293
93- print (get_candidate_list (client_socket ))
9494
9595 while (1 ):
9696 pass
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def http_get(socket_client, request):
2222 'Content-Type: text/html\r \n ' \
2323 '\r \n '
2424
25- candidates = ["1" , '2' ];
25+ candidates = [k for [ k , v ] in readjson ( 'election' ). split ( ',' )]
2626
2727 if (request ['Path' ] == '/' ):
2828 msgBody = '<html>' \
You can’t perform that action at this time.
0 commit comments