Questions tagged [response-headers]
545 questions
0
votes
1 answer
Error: Can't set headers after they are sent after tried to login
There are a lot of question with my issue but, I tried some of the solution and no one worked.
I'm getting the following error everytime I tried to do the login:
Error: Can't set headers after they are sent.
at validateHeader…

alessandro buffoli
- 658
- 2
- 10
- 29
0
votes
1 answer
How to remove http response header for specific pages?
I'd like to remove the "X-Frame-Options" response header for certain pages (or just change the value) so that those pages can be viewed from an iframe on anonymous sites.
I've tried
Response.Headers.Remove("X-Frame-Options");
But not…

SSED
- 475
- 3
- 9
- 22
0
votes
1 answer
Persist the custom header in ResponseHeader
I have all my MVC controllers inheriting from a base controller and it has a method which adds my required header in the response header:
protected override void OnActionExecuted(ActionExecutedContext filterContext)
{
…

PM.
- 1,735
- 1
- 30
- 38
0
votes
0 answers
Jersey Spring Boot add custom response header
I want to add custom header in spring boot JAX-RS application. I know couple of ways to add headers but my use case is not able to use these use cases.
My use case is that I want to create a random string on the one of the class and then add it to…

realcodes
- 259
- 1
- 5
- 17
0
votes
1 answer
Problem with 'Response Headers' values of File in Angular 4
I have one webservice that returns a pdf file (byte[]) and the file name in the Response Headers.
I can see the values of 'Response Headers' on Chrome and everyone is there (including the file name). But I can't get this values on Angular becouse…

Victor Soares
- 757
- 1
- 8
- 34
0
votes
1 answer
PHP response header content type keeps being text/html
I have a php page to retrieve uploaded (attached) files. The inputs of this file is the file name and its extension (for example jpg). Then I convert the extension to content type using function below:
function ConvertToMimeType($extension) {
…

ConductedClever
- 4,175
- 2
- 35
- 69
0
votes
1 answer
Missing headers in a 301 redirect response
It has been flagged by a pen tester for one of our clients that the site we built does not return the correct headers for a 302, 500 and 403 response. I have tested this and in fiddler I can see that the headers returned from a 302 are indeed…

Richard Banks
- 2,946
- 5
- 34
- 71
0
votes
3 answers
Node.js Can't set headers after they are sent Error after introducing res.render()
I have this snippet of code:
app.post('/pst', function(req, res) {
var data = req.body.convo;
res.render('waiting.ejs'); //ADDED THIS
myFunc(data).then(result => {
res.render('success.ejs'); …

user1584421
- 3,499
- 11
- 46
- 86
0
votes
0 answers
How to use response header location with static HTTPClient in C#
The below code is working fine for me and I use this httpclient to send requests to endpoints. In the response header I am getting location uri for the subsequent call.I want to use the same httpclient as the base uri is still same in location uri…

Vinod
- 23
- 7
0
votes
1 answer
How to Set Cache-Control Headers for varnish/cachewall
I little bit confused with my server. Its not returning cache-control headers with varnish and if I try to add cache control headers manually via .htaccess then varnish is not returning appropriate headers for HIT or MISS and Age numbers.
I also do…

Johny Sharma
- 55
- 11
0
votes
0 answers
HTTP Code 304 -> how should client behave?
We had a scenario where a proxy server was not finishing requests (kept waiting until timeout) with http status codes 304. Reason was, that our server was not returning a "Connection" Header. If we return a "Connection" Header (keep-alive or close),…

Martin
- 3,018
- 1
- 26
- 45
0
votes
1 answer
How can I repair a malformed value of a header on an HTTP response?
I'm trying to get the value of the Content-Type content header on an HTTP response.
private async void StartButton_Click(object sender, EventArgs e)
{
var client = new HttpClient();
// When I send a GET request to this website and print the…

Owen
- 321
- 2
- 12
0
votes
0 answers
response not getting cached because of faulty headers
one of the request of my web page is to retrieve the html panel data. This request is triggered with the help of java script from browser. The response received from the server include caching headers that are confusing. The headers received are…

SKap27
- 1
- 1
0
votes
0 answers
Angularjs modal service response headers
I am using angularjs as my front-end framework and for modals I use angular-modal-service.
I would like to add response header to every .html template used by this modal service. Any ideas?
user5324286
0
votes
2 answers
"No 'Access-Control-Allow-Origin' is present on the requested resource" error for css file
I created an sdk. When the css file is to be loaded, it gives this error.
The css file includes a .woff2 url for the font.
Even after removing that part of the code, the error persists.
I don't know how to handle this. Please help.

Winter
- 341
- 1
- 4
- 8