aboutsummaryrefslogtreecommitdiff
path: root/protocol.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-05-01 19:08:46 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-05-01 19:08:46 -0400
commit4108ae479d67067789f98267175e127e6a2a61ad (patch)
tree1252e35b507a405a97b077d07e3f3d8277f437e5 /protocol.f90
parent873ffd8201fd520122d8ec94bdd4230d79d0331c (diff)
downloadLR-87-4108ae479d67067789f98267175e127e6a2a61ad.zip
LR-87-4108ae479d67067789f98267175e127e6a2a61ad.tar.gz
Initial work on a sensible, packaged connection system.
Diffstat (limited to 'protocol.f90')
-rw-r--r--protocol.f9040
1 files changed, 40 insertions, 0 deletions
diff --git a/protocol.f90 b/protocol.f90
new file mode 100644
index 0000000..fa36fe7
--- /dev/null
+++ b/protocol.f90
@@ -0,0 +1,40 @@
+module gemini_protocol
+implicit none
+
+ integer, parameter::STATUS_INPUT = 1
+ integer, parameter::STATUS_SUCCESS = 2
+ integer, parameter::STATUS_REDIRECT = 3
+ integer, parameter::STATUS_TEMPFAIL = 4
+ integer, parameter::STATUS_PERMFAIL = 5
+ integer, parameter::STATUS_CERTREQ = 6
+ integer, parameter::STATUS_LOCALFAIL = -1
+
+contains
+
+ function request_url(url, unit_number, server_name) result(returncode)
+ use request
+ implicit none
+
+ character(*), intent(in)::url
+ integer, intent(in)::unit_number
+ character(*), intent(in), optional::server_name
+
+ integer::returncode
+
+ character(:), allocatable::server
+
+ returncode = -1
+
+ if(present(server_name)) then
+ allocate(character(len=len_trim(server_name)) :: server)
+ server = server_name
+ else
+ server = get_server_from_url(url)
+ end if
+
+
+
+
+ end function request_url
+
+end module gemini_protocol \ No newline at end of file