Access to a PDF File in a http with dinamyc variables - url

Hello everyone (sorry for bad English), i'm getting crazy with this problem... i'm working on a project with NiFi expecting to download PDF files from a public Goverment page. The main problem it's that the page you request in a web browser shows the correct page like this
Asking the same page in NiFi (also testing in postman) shows that the session has expire, then looking at the HTTPS POST with the development tools in chrome i notice that there are multiple headers that contain dynamic variables
Is there any form to replicate web browser behaviour on NiFi?

Related

All Invalid Random Paths in the URL Return The Normal Web Page Instead of 404 Not Found Page

I have a website:
https://www.includekarabuk.com
For instance this url contains an article:
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php
But when I add invalid path to the existing url, page is still being showed.
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/test123343242314321423423423/
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/sdfdsfdsfsdfdsfsdfsdfsdfsdsdfdsfsdfd/
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/132432432/
But because css and javascript file locations will be invalid due to added extra path, page is displayed as broken.
I want to stop this. When the web server receives invalid path as with above, it should respond as 404 not found page coming from web server. How can I do that? I am using Apache web server and php scripting language.
Note: I am not using any MVC framework.

Uncaught DOMException

Migrating my website to a secure server, a frame is being blocked by browsers because of a security issue which doesn't happen on my existing website, which is hosted on an http server. [Google Chrome Developer Console screen shot][1] [1]: https://i.stack.imgur.com/wQkpr.jpg
The page should load a calendar, but it does not do so.
I'm not a coding expert, and don't know how to resolve this. The issue happens when loading this page:
Page which generates DOMException
However, the site under development is hosted on a non-public server. In order to access it, the hosts file on a Windows platform would need to have this code added: 199.168.187.45 mauitradewinds.com www.mauitradewinds.com secure.mauitradewinds.com m.mauitradewinds.com
Without adding that code to the hosts file, a browser would be redirected to my existing http site, which is not where the issue is happening.
I'd be grateful for guidance on how to eliminate this frame blocking.
My guess is you have a protocol conflict between your iframe and your main page.
Your main page is accessing through http and the iframe through https.
Your existing website most probably has a redirect from http to https which is why the issue is not happening on the existing site.
A web developer solved this by observing that adding www to the URL would prevent the DOMException, and allow page frame content to load.

Network change from WIFI to 3g/4g produces HTTP Status 503 on random static files

This issue is strange, and i've spend a couple of days trying to solve it but i'm completely lost. I've developed a webapp with CodeIgniter 3.0.6 + AngularJS 1.5.5 as main frameworks for front/backend.
The problem is when I change the iPhone/iPad network from WIFI to 3G/4G,
some random HTTP GET request to static files fail. The files aren't always the same, but it only fails on images and js scripts.
The HTTP GET Status Code is 503 - Service Unavailable, and opening the file's URL points to a static HTML file with the same error.
The weirdest thing is that the response header Server changes from WIFI request (Apache) to 3G/4G request (nginx).
File loaded properly:
File error:
There are also other headers that are different between WIFI and (X)G request.
PHP works fine, HTML and dynamic data load properly. The problem appears to be at the static resources request.
EDIT
I've checked several websites hosted in 1and1, different hosting packs, and i 've even checked other domains hosted in the shared host where my app is running and it happends everywhere. The only change is the number of failing files, and it's random.
EDIT 2
After test with other ios browsers (Firefox and Opera), the problem seems to be focus on Safari and Chrome. Maybe i should say Webkit, but Opera seems fine.
EDIT 3
I've found and article (in comments, repu problems) while searching for a way to handle angular $http request from an offline device.
I need to go deeply and perform the tests described in the link, but seems a problem with the Websockets and the proxy servers used by operators, Vodafone in this case.
did anyone else find this issue?
I will edit this post with the improvements you suggest or the info you need.

MVC .Net Redirect to remote unhosted html file

I am trying to redirect to an unhosted html file in an MVC action. The page returns with corrupted content error. I am trying to redirect like this:
return Redirect("file:///C:/test/mytestfile.html");
This of course works fine if the file is on a web server:
return Redirect("http://myserver/mytestfile.html");
Is it even possible to use the file protocol when redirecting in MVC? I've also tried:
return new RedirectResult("file:///C:/test/mytestfile.html");
and
Response.Redirect("file:///C:/test/mytestfile.html");
The project I'm doing this in is a bridge solution to overcome some shortcomings in a vendor solution, so unfortunately I can't just move the target files to web server. I really need to redirect to the file on the share where it lives.
This is not supported and is not a limitation of ASP.NET MVC, it is how web browsers work. You cannot redirect to the file:/// protocol if the web application is hosted on a web server (http://). You can only redirect to file:/// if the page that is redirecting is also hosted on file:///.
More info on the subject can be found here and the rules are defined here.
You could possibly have the website do a file read on the HTML file and then output the file to the page. This might be a start. You would end up with a wrapper "page" on your site that mirrored the remote HTML file.

Redmine Project files form Server Displaying actual html code instead of web page

When i browse my redmine url as http://redmine.mydomain.com it opens download dialogue box and that main page is saved instead of redering html
When i do http://redmine.mydomain.com/login it shows the html code of the login page instead of displaying login page.
It was working fine before 3-4 days. What is wrong all of a sudden? Please help me.
Are you using apache as a proxy?
Make sure you are not modifying the ContentType header with some AddType or Header directive.
On firefox 11 you can open the Web Console (Ctr-Shift-K), open http://redmine.mydomain.com/login and see the Content-Type of the response.
You should be receiving something like: Content-Type:text/html; charset=utf-8.
You can also try making the request directly to your rack server, if you're using thin or mongrel, and see if you also get the same Content-Type.

Resources