laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41998?usp=email )
Change subject: http_json_api: Only require Content-Type if response body is non-empty
......................................................................
http_json_api: Only require Content-Type if response body is non-empty
If there is an empty body returned, such as in the case of the response
to an es9p notification, then it is of course also legal to not set the
content-type header.
This patch fixes an exception when talking to certain SM-DP+ with
es9p_client.py:
DEBUG:pySim.esim.http_json_api:HTTP RSP-STS: [204] hdr: {'X-Admin-Protocol': 'gsma/rsp/v2.5.0', 'Date': 'Wed, 28 Jan 2026 18:26:39 GMT', 'Server': 'REDACTED'}
DEBUG:pySim.esim.http_json_api:HTTP RSP: b''
{'X-Admin-Protocol': 'gsma/rsp/v2.5.0', 'Date': 'Wed, 28 Jan 2026 18:26:39 GMT', 'Server': 'REDACTED'}
<Response [204]>
Traceback (most recent call last):
File "gprojects/git/pysim/es9p/../contrib/es9p_client.py", line 315, in <module>
c.do_notification()
~~~~~~~~~~~~~~~~~^^
File "projects/git/pysim/es9p/../contrib/es9p_client.py", line 159, in do_notification
res = self.peer.call_handleNotification(data)
File "projects/git/pysim/contrib/pySim/esim/es9p.py", line 174, in call_handleNotification
return self.handleNotification.call(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "projects/git/pysim/contrib/pySim/esim/http_json_api.py", line 335, in call
if not response.headers.get('Content-Type').startswith(req_headers['Content-Type']):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
Change-Id: I99e8f167b7bb869c5ff6d908ba673dac87fef71a
---
M pySim/esim/http_json_api.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/98/41998/1
diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py
index e640b3f..36caac9 100644
--- a/pySim/esim/http_json_api.py
+++ b/pySim/esim/http_json_api.py
@@ -330,7 +330,7 @@
# SGP.22, section 6.5.1)
if response.status_code != self.api_func.expected_http_status:
raise HttpStatusError(response)
- if not response.headers.get('Content-Type').startswith(req_headers['Content-Type']):
+ if response.content and not response.headers.get('Content-Type').startswith(req_headers['Content-Type']):
raise HttpHeaderError(response)
if not response.headers.get('X-Admin-Protocol', 'gsma/rsp/v2.unknown').startswith('gsma/rsp/v2.'):
raise HttpHeaderError(response)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41998?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I99e8f167b7bb869c5ff6d908ba673dac87fef71a
Gerrit-Change-Number: 41998
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Attention is currently required from: neels.
laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40341?usp=email )
Change subject: es2p.py: also allow 18 digit ICCID
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
> IIRC i leaned on this one: […]
Mh, ok, if we permit 18 digits for physical cards, we should be consistent and also allow it for eSIM profiles.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40341?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iaa6e710132e3f4c6cecc5ff786922f6c0fcfb54e
Gerrit-Change-Number: 40341
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 31 Jan 2026 10:50:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41974?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: es9p_client: MAke install notification code execute at all
......................................................................
es9p_client: MAke install notification code execute at all
The caller specified 'install' but the do_notification() function
compared with 'download' :(
Change-Id: I2d441cfbc1457688eb163301d3d91a1f1fdc7a8c
---
M contrib/es9p_client.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
dexter: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/contrib/es9p_client.py b/contrib/es9p_client.py
index c1455dc..d1e164f 100755
--- a/contrib/es9p_client.py
+++ b/contrib/es9p_client.py
@@ -126,7 +126,7 @@
if self.opts.iccid:
ntf_metadata['iccid'] = h2b(swap_nibbles(self.opts.iccid))
- if self.opts.operation == 'download':
+ if self.opts.operation == 'install':
pird = {
'transactionId': h2b(self.opts.transaction_id),
'notificationMetadata': ntf_metadata,
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2d441cfbc1457688eb163301d3d91a1f1fdc7a8c
Gerrit-Change-Number: 41974
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
neels has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41874?usp=email )
Change subject: esim/http_json_api: extend JSON API with server functionality
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
This patch creates an API incompatibility that currently sabotages downstream SM-DP+ proxy implementations.
It would be great if the client API could keep its old names in a compatible way, and the new server side gets new, unused names? Or keep the old name, and add a new name with "2" in the end?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41874?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I277aa90fddb5171c4bf6c3436259aa371d30d092
Gerrit-Change-Number: 41874
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 31 Jan 2026 05:54:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41969?usp=email )
Change subject: contrib/csv-to-pgsql: add missing copyright header
......................................................................
contrib/csv-to-pgsql: add missing copyright header
Change-Id: Iad8b2c1abb6a80764d05c823fbd03a9eae0ec0ab
---
M contrib/csv-to-pgsql.py
1 file changed, 18 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/contrib/csv-to-pgsql.py b/contrib/csv-to-pgsql.py
index dad408d..416d870 100755
--- a/contrib/csv-to-pgsql.py
+++ b/contrib/csv-to-pgsql.py
@@ -1,5 +1,23 @@
#!/usr/bin/env python3
+# (C) 2025 by sysmocom - s.f.m.c. GmbH
+# All Rights Reserved
+#
+# Author: Philipp Maier
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import argparse
import logging
import csv
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41969?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iad8b2c1abb6a80764d05c823fbd03a9eae0ec0ab
Gerrit-Change-Number: 41969
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>