Check-in [e8a8d61f52]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[HTTP.BAS] - Implement the SetContentType function.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:e8a8d61f526cc10aa84b021ebbd48a9a45e4d2aa
User & Date: Administrador 2016-10-06 02:54:21
Context
2016-10-06
02:57
[HTTP.BAS] - Initialize itself the main header line and set the default content type. check-in: a2671ef974 user: Administrador tags: trunk
02:54
[HTTP.BAS] - Implement the SetContentType function. check-in: e8a8d61f52 user: Administrador tags: trunk
02:50
[HTTP.BAS] - Implement two functions to Set and Get HTTP Cookie values. check-in: afc2bb0ecf user: Administrador tags: trunk
Changes

Changes to root/core/http.bas.

36
37
38
39
40
41
42












  IF cookieName$ <> "" THEN
    GetCookie$ = SplitVar$(RawCookieStr$, cookieName$, CHR$(59))
  ELSE
    GetCookie$ = RawCookieStr$
  END IF
  RawCookieStr$ = ""
END FUNCTION



















>
>
>
>
>
>
>
>
>
>
>
>
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  IF cookieName$ <> "" THEN
    GetCookie$ = SplitVar$(RawCookieStr$, cookieName$, CHR$(59))
  ELSE
    GetCookie$ = RawCookieStr$
  END IF
  RawCookieStr$ = ""
END FUNCTION

FUNCTION SetContentType$(mimeType$)
  DIM strOutput$
  'Add the Content-type
  strOutput$ = "Content-Type:" + CHR$(32) + mimeType$
  'TODO: Add the charset based on site encoding setting
  'Add the line feed
  strOutput$ = strOutput$ + CHR$(13) + CHR$(10)
  'Return the entire line
  SetContentType$ = strOutput$
  strOutput$ = ""
END FUNCTION