Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "httpmorph"
version = "0.1.0-alpha.1"
version = "0.1.2"
description = "A Python HTTP client focused on mimicking browser fingerprints."
readme = "README.md"
requires-python = ">=3.8"
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/_httpmorph.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ cdef class Client:

# Add default headers that will be added by C code if not present
if 'User-Agent' not in request_headers:
request_headers['User-Agent'] = 'httpmorph/0.1.0-alpha.1'
request_headers['User-Agent'] = 'httpmorph/0.1.2'
if 'Accept' not in request_headers:
request_headers['Accept'] = '*/*'
if 'Connection' not in request_headers:
Expand Down Expand Up @@ -464,7 +464,7 @@ cdef class Session:
'safari': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15',
'edge': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0',
}
default_ua = browser_user_agents.get(self._browser, 'httpmorph/0.1.0-alpha.1')
default_ua = browser_user_agents.get(self._browser, 'httpmorph/0.1.2')

# Add browser-specific User-Agent header if not already set
has_user_agent = False
Expand Down
2 changes: 1 addition & 1 deletion src/core/httpmorph.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ static int send_http_request(SSL *ssl, int sockfd, const httpmorph_request_t *re
/* Add default headers if missing */
if (!has_user_agent) {
/* Use request's user agent if set, otherwise use generic */
const char *user_agent = request->user_agent ? request->user_agent : "httpmorph/0.1.0-alpha.1";
const char *user_agent = request->user_agent ? request->user_agent : "httpmorph/0.1.2";
p += snprintf(p, SNPRINTF_SIZE(end - p), "User-Agent: %s\r\n", user_agent);
}
if (!has_accept) {
Expand Down
2 changes: 1 addition & 1 deletion src/httpmorph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import sys

__version__ = "0.1.0-alpha.1"
__version__ = "0.1.2"
__author__ = "Arman Hossain"
__license__ = "MIT"

Expand Down
2 changes: 1 addition & 1 deletion src/httpmorph/_client_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,4 +881,4 @@ def version():
"""Get library version"""
if HAS_C_EXTENSION:
return _httpmorph.version()
return "0.1.0-alpha.1"
return "0.1.2"
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
httpmorph test suite
"""

__version__ = "0.1.0-alpha.1"
__version__ = "0.1.2"
Loading