Skip to content

user-agent header set twice #17

@NotFiliberto

Description

@NotFiliberto
	const headers = {
		"sec-ch-ua":
			'"Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"',
		"sec-ch-ua-mobile": "?0",
		"sec-ch-ua-platform": '"macOS"',
		dnt: "1",
		"upgrade-insecure-requests": "1",
		"user-agent":
			"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36",
		accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
		"sec-fetch-site": "none",
		"sec-fetch-mode": "navigate",
		"sec-fetch-user": "?1",
		"sec-fetch-dest": "document",
		"accept-encoding": "gzip, deflate, br, zstd",
		"accept-language": "it-IT,it;q=0.9",
		priority: "u=0, i",
	}
	const headerOrder = Object.keys(headers)

	// 2. Create a session for making requests
	const session = new SessionClient(moduleClient, {
		tlsClientIdentifier: "chrome_133",
		withRandomTLSExtensionOrder: false,
		proxyUrl: useProxy ? process.env.PROXY_URL : null,
		timeoutSeconds: 30,
	})

	const ipResponse = await session.get("https://fansale.it", {
		headers,
		headerOrder
	})

that's my setup for making the request, but when i analyzed the request with powhttp app i saw that the user-agent header is sent twice, from the browser request is sent correctly just once, the weird things is that the additional header is overridden with random user-agent value

Image

powhttp is a new app for analyzing web requests and the important thing is that it preserver the exact headers orders

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions