@@ -162,11 +162,11 @@ public function newEvent(GSEvent $event): string {
162
162
* @param GSWrapper $wrapper
163
163
* @param string $protocol
164
164
*/
165
- public function broadcastWrapper (GSWrapper $ wrapper, string $ protocol ): void {
165
+ public function broadcastWrapper (GSWrapper $ wrapper ): void {
166
166
$ status = GSWrapper::STATUS_FAILED ;
167
167
168
168
try {
169
- $ this ->broadcastEvent ($ wrapper ->getEvent (), $ wrapper ->getInstance (), $ protocol );
169
+ $ this ->broadcastEvent ($ wrapper ->getEvent (), $ wrapper ->getInstance ());
170
170
$ status = GSWrapper::STATUS_DONE ;
171
171
} catch (RequestContentException | RequestNetworkException | RequestResultSizeException | RequestServerException | RequestResultNotJsonException $ e ) {
172
172
}
@@ -192,7 +192,7 @@ public function broadcastWrapper(GSWrapper $wrapper, string $protocol): void {
192
192
* @throws RequestResultSizeException
193
193
* @throws RequestServerException
194
194
*/
195
- public function broadcastEvent (GSEvent $ event , string $ instance, string $ protocol = '' ): void {
195
+ public function broadcastEvent (GSEvent $ event , string $ instance ): void {
196
196
$ this ->signEvent ($ event );
197
197
198
198
if ($ this ->configService ->isLocalInstance ($ instance )) {
@@ -202,12 +202,7 @@ public function broadcastEvent(GSEvent $event, string $instance, string $protoco
202
202
$ path = $ this ->urlGenerator ->linkToRoute ('circles.GlobalScale.broadcast ' );
203
203
$ request = new NC19Request ($ path , Request::TYPE_POST );
204
204
$ this ->configService ->configureRequest ($ request );
205
- $ protocols = ['https ' , 'http ' ];
206
- if ($ protocol !== '' ) {
207
- $ protocols = [$ protocol ];
208
- }
209
205
$ request ->setInstance ($ instance );
210
- $ request ->setProtocols ($ protocols );
211
206
}
212
207
213
208
$ request ->setDataSerialize ($ event );
@@ -235,14 +230,9 @@ public function confirmEvent(GSEvent &$event): void {
235
230
$ path = $ this ->urlGenerator ->linkToRoute ('circles.GlobalScale.event ' );
236
231
237
232
$ request = new NC19Request ($ path , Request::TYPE_POST );
238
- $ request ->basedOnUrl ($ owner ->getInstance ());
239
233
$ this ->configService ->configureRequest ($ request );
234
+ $ request ->basedOnUrl ($ owner ->getInstance ());
240
235
241
- if ($ this ->get ('REQUEST_SCHEME ' , $ _SERVER ) !== '' ) {
242
- $ request ->setProtocols ([$ _SERVER ['REQUEST_SCHEME ' ]]);
243
- } else {
244
- $ request ->setProtocols (['https ' , 'http ' ]);
245
- }
246
236
$ request ->setDataSerialize ($ event );
247
237
248
238
$ result = $ this ->retrieveJson ($ request );
@@ -423,7 +413,6 @@ public function confirmCircleStatus(Circle $circle): bool {
423
413
$ path = $ this ->urlGenerator ->linkToRoute ('circles.GlobalScale.status ' );
424
414
$ request = new NC19Request ($ path , Request::TYPE_POST );
425
415
$ this ->configService ->configureRequest ($ request );
426
- $ request ->setProtocols (['https ' , 'http ' ]);
427
416
$ request ->setDataSerialize ($ event );
428
417
429
418
$ requestIssue = false ;
0 commit comments