@@ -141,68 +141,37 @@ def do_POST(self):
141
141
142
142
if soap_action == '"http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetConfig"' :
143
143
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wusp/b76899b4-ad55-427d-a748-2ecf0829412b
144
-
145
- logging .info ('SOAP Action: {}' .format (soap_action ))
146
-
147
144
data = BeautifulSoup (update_handler .get_config_xml , 'xml' )
148
145
149
- self ._set_response ()
150
- self .wfile .write (data .encode_contents ())
151
-
152
146
elif soap_action == '"http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetCookie"' :
153
147
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wusp/36a5d99a-a3ca-439d-bcc5-7325ff6b91e2
154
-
155
- logging .info ('SOAP Action: {}' .format (soap_action ))
156
-
157
148
data = BeautifulSoup (update_handler .get_cookie_xml , "xml" )
158
149
159
- self ._set_response ()
160
- self .wfile .write (data .encode_contents ())
161
-
162
150
elif soap_action == '"http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/SyncUpdates"' :
163
151
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wusp/6b654980-ae63-4b0d-9fae-2abb516af894
164
-
165
- logging .info ('SOAP Action: {}' .format (soap_action ))
166
-
167
152
data = BeautifulSoup (update_handler .sync_updates_xml , "xml" )
168
153
169
- self ._set_response ()
170
- self .wfile .write (data .encode_contents ())
171
-
172
154
elif soap_action == '"http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetExtendedUpdateInfo"' :
173
155
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wusp/862adc30-a9be-4ef7-954c-13934d8c1c77
174
-
175
- logging .info ('SOAP Action: {}' .format (soap_action ))
176
-
177
156
data = BeautifulSoup (update_handler .get_extended_update_info_xml , "xml" )
178
157
179
- self ._set_response ()
180
- self .wfile .write (data .encode_contents ())
181
-
182
158
elif soap_action == '"http://www.microsoft.com/SoftwareDistribution/ReportEventBatch"' :
183
159
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wusp/da9f0561-1e57-4886-ad05-57696ec26a78
184
-
185
- logging .info (soap_action )
186
-
187
160
data = BeautifulSoup (update_handler .report_event_batch_xml , "xml" )
188
161
189
- self ._set_response ()
190
- self .wfile .write (data .encode_contents ())
191
-
192
162
elif soap_action == '"http://www.microsoft.com/SoftwareDistribution/Server/SimpleAuthWebService/GetAuthorizationCookie"' :
193
163
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wusp/44767c55-1e41-4589-aa01-b306e0134744
194
-
195
- logging .info ('SOAP Action: {}' .format (soap_action ))
196
-
197
164
data = BeautifulSoup (update_handler .get_authorization_cookie_xml , "xml" )
198
165
199
- self ._set_response ()
200
- self .wfile .write (data .encode_contents ())
201
-
202
166
else :
203
- logging .warning ("SOAP Action not defined" )
167
+ logging .warning ("SOAP Action not handled" )
168
+ logging .info ('SOAP Action: {}' .format (soap_action ))
204
169
return
205
170
171
+ self ._set_response ()
172
+ self .wfile .write (data .encode_contents ())
173
+ logging .info ('SOAP Action: {}' .format (soap_action ))
174
+
206
175
if data is not None :
207
176
logging .debug ("POST Response,\n Path: {path}\n Headers:\n {headers}\n \n Body:\n {body}\n " .format (path = self .path , headers = self .headers , body = data .encode_contents ))
208
177
else :
0 commit comments