Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
fix response content type, fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
xini committed Apr 25, 2016
1 parent 64f83f9 commit 470e719
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.1]

* Fix response content type

## [1.0.0]

* Changelog added
Expand Down
4 changes: 3 additions & 1 deletion code/SapphireSoapServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SapphireSoapServer extends Controller {
);

function wsdl() {
$this->getResponse()->addHeader("Content-Type", "text/xml");
$this->getResponse()->addHeader("Content-Type", "text/xml; charset=utf-8");

return array();
}
Expand Down Expand Up @@ -93,6 +93,8 @@ function index() {
$fh = fopen($wsdlFile, 'w');
fwrite($fh, $wsdl);
fclose($fh);

$this->getResponse()->addHeader("Content-Type", "text/xml; charset=utf-8");

$s = new SoapServer($wsdlFile, array('cache_wsdl' => WSDL_CACHE_NONE));
$s->setClass($this->class);
Expand Down

0 comments on commit 470e719

Please sign in to comment.