summaryrefslogtreecommitdiffstats
path: root/base/native-tools/src/sslget/sslget.c
diff options
context:
space:
mode:
Diffstat (limited to 'base/native-tools/src/sslget/sslget.c')
-rw-r--r--base/native-tools/src/sslget/sslget.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/native-tools/src/sslget/sslget.c b/base/native-tools/src/sslget/sslget.c
index 7288a1c..a7c6a3f 100644
--- a/base/native-tools/src/sslget/sslget.c
+++ b/base/native-tools/src/sslget/sslget.c
@@ -426,7 +426,11 @@ do_io( PRFileDesc *ssl_sock, int connection)
buf2 = 0;
}
- if ( ! PL_strnstr(buf,"200",13)) {
+ char *status_string = PL_strndup(buf+9, 3);
+ int status = atoi(status_string);
+ PL_strfree(status_string);
+
+ if (status >= 300) {
PR_Free(buf);
buf = 0;
exit(3);