Skip to content

Commit

Permalink
Manually set JSON content-type header
Browse files Browse the repository at this point in the history
I can't figure out why the .htaccess-set content-type header isn't doing anything (probably because I'm sick at the moment, making me dumb), so here's a lousy fix for now. Toward #18.
  • Loading branch information
waldoj committed Sep 3, 2019
1 parent 9998e8b commit 8efe304
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htdocs/1.0/bill.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');


# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.0/bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');


# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.0/code-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific page.
@connect_to_db();
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.0/legislator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific
# page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.0/photosynthesis.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific
# page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/bill.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# LOCALIZE VARIABLES
$year = mysql_escape_string($_REQUEST['year']);
$bill = mysql_escape_string(strtolower($_REQUEST['bill']));
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific page.
$database = new Database;
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/code-section-video.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific
# page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/code-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific
# page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/legislator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific
# page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/legislators.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

/*
* DECLARATIVE FUNCTIONS
* Run those functions that are necessary prior to loading this specific page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/photosynthesis.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific
# page.
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/tag-suggest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

/*
* Localize variables
*/
Expand Down
2 changes: 2 additions & 0 deletions htdocs/1.1/vote.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
require_once $_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php';
require_once 'functions.inc.php';

header('Content-type: application/json');

/*
* Localize variables
*/
Expand Down

0 comments on commit 8efe304

Please sign in to comment.