I am getting a 403 Forbidden error with some sites while they work fine with Opera, Netscape Communicator, or Internet Explorer. How do I fix this?
Previous Top Next
This happening because some administrators are now filtering HTTP requests from programs that send the HTTP User-Agent header with the value "Mozilla/3.0 (compatible; Indy Library)". This is the default value provided by TIdHTTP. Unfortunately, some people used TIdHTTP in their malware (denial of service programs, E-Mail address web-harvesters, password cracking programs. and ill-behaved web-robots). To counter this, some administrators block such programs from accessing their website using the HTTP User-Agent header value meaning that not only will they block those malware programs but other Indy based applications which send the default value.
We can not change this default value because we provided it for a historical reason. At one time, Netscape Navigator was extremely popular and had some high-end features such as Java, Java Script, and frames as a well as a few proprietary HTML tags. Some webmasters started filtering HTTP requests from non-Netscape web-browsers because they couldn't work on their websites. To bypass this restriction, Microsoft Internet Explorer would send "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" and other programs started sending similar strings. When doing Indy 8.0, we were well aware of this and created a default user agent value of "Mozilla/3.0 (compatible; Indy Library)".
You need to change the TIdHTTP.Request.UserAgent property from the default value to your own value. When doing this, the string should start with the text "Mozilla/3.0 (compatible; " followed by the name of your program, followed by a ")".
2014년 12월 21일 일요일
피드 구독하기:
글 (Atom)
tensorflow gpu 사용하기에서
tensorflow 설치시 주의해야 한다. # Anything above 2.10 is not supported on the GPU on Windows Native python - m pip install "tensorflow<2.11...
-
클라이언트가 HTTP프로토콜을 이용해서 서버에 무언가를 전달할 때 Get 이나 Post가 사용됩니다. GET은 주소줄에 값이 ?뒤에 쌍으로 이어붙고 여러개일 경우에는 & 으로 반복하고, POST는 숨겨져서(body안에) 보내집니다. GET...
-
1. 휴대폰 앱을 이용하여 키움증권 비대면 계좌를 만듭니다. 2. Open Api 사용신청을 합니다. 3. 모의투자 신청을 합니다. 4. 멀티접속을 신청합니다. 5. 키움증권에 접속하여 키움 Open Api+ 를 다운 받아 설치한다. 6. 키...
-
일단은 Python 사이트에가서 dmg 파일을 다운받아 설치합니다. m1 프로세서일경우에는 아래에 있는 파일이겠죠. 터미널을 열어 파이썬의 위치를 확인합니다. 파이썬3의 위치로 이동합니다. [cd /usr/local/bin] 파인더를 엽니다. [...