Spring Webflux, Server Sent Events & Firefox - firefox

I'm trying to get server sent events to work with Mozilla Firefox. Given a Spring Boot webservice like
#GetMapping(path = "/timestamps", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<String> timestamps() {
return Flux.interval(Duration.ofSeconds(1))
.map(sequence -> LocalTime.now().toString());
}
which works fine using Chrome browser or Edge (always latest versions). I can see an unfinished request in the network analyzer tab and every second a new timestamp is displayed.
However, when I use Firefox (84.0.2 or older), the request is also shown in the network tab but no response headers or streaming data is shown.
When I terminate the Spring backend, Firefox pops up a dialog to save a file with the contents of the request, which fails, because the backend is already terminated.
It seems to me that there is some kind of flush() missing on the backend side.
Can anyone confirm or deny such behaviour with FF, Spring Webflux & SSE?

The issue is solved. It was Sophos Antivirus Web Safety, which scanned and blocked http traffic. Switching to https - so Sophos cannot scan anymore - or disabling Web Safety solved the issue.

Related

Websocket working in Postman, but not in Chrome

I am having a spring boot application, where I created some websockets.
I can connect to them on postman via localhost:8080/ws/v1 , but when I try to connect to the websockt in chrome with the following code
let socket = new WebSocket("ws://localhost:8080/ws/v1");
it is not working.
Do you have any idea if the browser has some extra security checks like CORS for http requests that I need to handle?
I am suspecting the culprit might be not using a secure connection. (wss:// not ws://)
Have seen a bunch of posts saying chrome does not allow unsecured websockets.

Intercepting requests sent by iframe

I am trying to intercept all web requests using by Puppeteer-Sharp but it is not working properly if the request sent by IFrame which is located on the page. For instance, After navigated this link, I clicked the video link since the video is in the iframe(maybe this is not the cause, this is only my hypothesis), the new web requests sent by IFrame did not intercept but the others were intercepted. When I checked it on the Chrome Developer Tools I was able to see what I am looking for and also more requests.
By the way, I set Request Interception as true as below:
await page.SetRequestInterceptionAsync(true);
and I registered for the PageRequest event as below:
page.Request += Page_Request
Is there any other setting or missing setup?

Firefox not sending request after response 500

As you guys can see below when I am trying to upload a file XLSX into my API in Firefox, if XLSX does not have all columns that I need to map it to a class, I will throw an Exception and it will return a status 500. If I do not change the file I will get error 500 infinite times. Like below
After some requests it does not send anymore. And it only happens when I change the file, the 4th request below should return status 200. When I debug my application in spring it is not even entering the endpoint.
In Chrome I do not have this problem, I can sent a lot of requests and the behavior is different. Do you guys know if firefox has some security to prevent multiple requests like this? If I reload the page and send the 4th request alone it will return status 200.
I am using Angular 5 + Spring Boot

response message in SOAPUI is displayed encrypted

I try to test a web-service using SOAPUI using a HTTPS endpoint. The problem is that the response message is displayed encrypted. What do I need to configure in SOAPUI in order to see the actual response message?
I tried various settings (e.g. in preferences I tried to set an exported certificate from Firefox), but no luck so far. Note that the security of the web-service is implemented using a username/password mechanism in the SOAP header and the same call works fine on a HTTP endpoint (we have a couple of environments available).
Just had this same problem and found the solution here:
http://www.eviware.com/forum/viewtopic.php?f=5&t=2601&p=10862&hilit=encrypted+response+https#p10862
Basically you need to go into file->preferences->http settings and uncheck the 'Response compression' checkbox.

Google chrome and cache

Merged with Google Chrome cache problem.
all,
I am building a service using Spring 3.0 and i am using spring security for authorization/authentication. I have correctly setup the Apache/Tomcat ajp setup to use SSL and send appropriate cache headers for all static resources (1 week) which Firefox seems to interpret correctly (i can tell from firebug that it doesn't fetch these resources each time). On the other hand, Google chrome will only fetch the static resources (.css, .js) from cache for the login page. For all the rest of the pages/requests it sends a GET to the server and then the server replys with a 304 Not Modified response. If i disable SSL caching works normally but only for the same jsessionid that Spring security uses. I have checked the browsers cache and i actually saw that for plain HTTP resources are getting cached but are bound to a specific jsessionid i.e.
http://localhost/myservice/resources/jquery/js/jquery-ui-1.8.9.custom.min.js;jsessionid=3B15E163E138CCE8839306FF5A924D87
I am confused...can anyone help?
Thanks

Resources