user-agent

Can I modify the Request.Headers collection?

主宰稳场 提交于 2020-01-22 21:00:12
问题 I have an ASP.NET site that uses a third-party reporting component. This component is misbehaving by throwing a NullReferenceException whenever the client browser is not specifying a User-Agent in the request headers. It's basically an odd scenario that I'm just trying to come up with a workaround for. I do not know who/what client is not specifying a User-Agent, which seems like bad form IMO, but we have to deal with the exceptions it is generating. I have logged a support ticket with the

What software is sending User-Agent “Test Certificate Info”?

試著忘記壹切 提交于 2020-01-22 06:07:25
问题 Google is surprisingly mute on this issue. In my company's web software error logs, we're seeing multiple individuals with an Apache access log entry that has this in it: ... HTTP/1.1" 500 - "-" "Test Certificate Info" I have no clue what piece of software this comes from or why it's sending us requests with malformed URLs... but it'd be nice to find out... and perhaps to correct it if it's open source software. :) (This might be a ServerFault question, but I'm a developer so I figured I'd

Access Denied page with headless Chrome on Linux while headed Chrome works on windows using Selenium through Python

别说谁变了你拦得住时间么 提交于 2020-01-21 19:21:13
问题 I have this code that I'm using on my local machine: from selenium import webdriver chrom_path = r"C:\Users\user\sof\chromedriver_win32\chromedriver.exe" driver = webdriver.Chrome(chrom_path) link = 'https://www.google.com/' driver.get(link) s = driver.page_source print((s.encode("utf-8"))) driver.quit() and this code return page source of this website, however when I go on Linux server centos7 and I use this code: from selenium import webdriver options = webdriver.ChromeOptions() options.add

Check User-Agent with jsf

半城伤御伤魂 提交于 2020-01-20 06:58:52
问题 I want to check the user agent of my client. (If it's possible the browser type/version) But I don't know how do that... Thank you for your help. 回答1: It is OK, I have find. I use : final HttpServletRequest request =(HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest(); final String userAgent = request.getHeader("user-agent"); System.out.println(userAgent); Thank you for your help. 回答2: It is sent in the User-Agent http header. HttpServletRequest request =

How to detect the stock Android browser

霸气de小男生 提交于 2020-01-19 06:52:06
问题 Navigating to http://whatsmyuseragent.com/ shows me my stock Android browser on my Galaxy Nexus running 4.2.1 has the user agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.34 Safari/534.24 There is nothing in this user agent that allows me to uniquely detect that it is a stock Android browser. The Chrome for Android app at least has android in the UA. Is there any way for me to detect the stock Android app? 回答1: var navU = navigator.userAgent; //

What is the iOS 6 user agent string?

我的未来我决定 提交于 2020-01-18 21:37:04
问题 What is the iOS 6.0 user agent string? Previous user-agent strings: iOS 5.1 - What is the iOS 5.1 user agent string? iOS 5.0 - What is the iOS 5.0 user agent string? iOS 4.0 - What is the iPhone 4 user-agent? 回答1: iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 iPad: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 For a

What is the iOS 6 user agent string?

时光毁灭记忆、已成空白 提交于 2020-01-18 21:36:09
问题 What is the iOS 6.0 user agent string? Previous user-agent strings: iOS 5.1 - What is the iOS 5.1 user agent string? iOS 5.0 - What is the iOS 5.0 user agent string? iOS 4.0 - What is the iPhone 4 user-agent? 回答1: iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 iPad: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 For a

What is the iOS 6 user agent string?

江枫思渺然 提交于 2020-01-18 21:36:06
问题 What is the iOS 6.0 user agent string? Previous user-agent strings: iOS 5.1 - What is the iOS 5.1 user agent string? iOS 5.0 - What is the iOS 5.0 user agent string? iOS 4.0 - What is the iPhone 4 user-agent? 回答1: iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 iPad: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 For a

What is the iOS 6 user agent string?

不打扰是莪最后的温柔 提交于 2020-01-18 21:35:48
问题 What is the iOS 6.0 user agent string? Previous user-agent strings: iOS 5.1 - What is the iOS 5.1 user agent string? iOS 5.0 - What is the iOS 5.0 user agent string? iOS 4.0 - What is the iPhone 4 user-agent? 回答1: iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 iPad: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 For a

Classification of Blackberry devices by using useragent

旧时模样 提交于 2020-01-17 04:13:08
问题 I need to classify blackberry devices based on OS version. if BB5 and BB6 then {do this} if BB7 and above then {do this} I knew, BB 5 useragent looks like this : BlackBerry9700/5.x.x.x Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/229 BB 6 onward useragent is : Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; zh-TW) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.x.x.x Mobile Safari/534.1+ So, How can i classify 5&6 and 7&above? 回答1: The open source Detect Mobile Browsers script may be what