Posted on Leave a comment

Re-reading ASP.Net Core request bodies with EnableBuffering()

Avatar

Jeremy

In some scenarios there’s a need to read the request body multiple times. Some examples include

  • Logging the raw requests to replay in load test environment
  • Middleware that read the request body multiple times to process it

Usually Request.Body does not support rewinding, so it can only be read once. A straightforward solution is to save a copy of the stream in another stream that supports seeking so the content can be read multiple times from the copy.

In ASP.NET framework it was possible to read the body of an HTTP request multiple times using HttpRequest.GetBufferedInputStream method. However, in ASP.NET Core a different approach must be used.

In ASP.NET Core 2.1 we added an extension method EnableBuffering() for HttpRequest. This is the suggested way to enable request body for multiple reads. Here is an example usage in the InvokeAsync() method of a custom ASP.NET middleware:

public async Task InvokeAsync(HttpContext context, RequestDelegate next)
{ context.Request.EnableBuffering(); // Leave the body open so the next middleware can read it. using (var reader = new StreamReader( context.Request.Body, encoding: Encoding.UTF8, detectEncodingFromByteOrderMarks: false, bufferSize: bufferSize, leaveOpen: true)) { var body = await reader.ReadToEndAsync(); // Do some processing with body… // Reset the request body stream position so the next middleware can read it context.Request.Body.Position = 0; } // Call the next delegate/middleware in the pipeline await next(context);
}

The backing FileBufferingReadStream uses memory stream of a certain size first then falls back to a temporary file stream. By default the size of the memory stream is 30KB. There are also other EnableBuffering() overloads that allow specifying a different threshold, and/or a limit for the total size:

public static void EnableBuffering(this HttpRequest request, int bufferThreshold) public static void EnableBuffering(this HttpRequest request, long bufferLimit) public static void EnableBuffering(this HttpRequest request, int bufferThreshold, long bufferLimit)

For example, a call of

context.Request.EnableBuffering(bufferThreshold: 1024 * 45, bufferLimit: 1024 * 100);

enables a read buffer with limit of 100KB. Data is buffered in memory until the content exceeds 45KB, then it’s moved to a temporary file. By default there’s no limit on the buffer size but if there’s one specified and the content of request body exceeds the limit, an System.IOException will be thrown.

These overloads offer flexibility if there’s a need to fine-tune the buffering behaviors. Just keep in mind that:

  • Even though the memory stream is rented from a pool, it still has memory cost associated with it.
  • After the read is over the bufferThreshold the performance will be slower since a file stream will be used.
Avatar
Jeremy Meng

Software Development Engineer

Follow Jeremy   

<!–


–>

Posted on Leave a comment

PHP 7.1.27 Released

Afternoon, The PHP development team announces the immediate availability of PHP 7.1.27. This is a security release. All PHP 7.1 users are encouraged to upgrade to this version. For source downloads of PHP 7.1.27 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: http://php.net/releases/7_1_27.php Downloads: http://www.php.net/downloads Windows downloads: http://windows.php.net/download Changelog: http://www.php.net/ChangeLog-7.php#7.1.27 Many thanks to all the contributors and supporters! Cheers Joe
Posted on Leave a comment

PHP 7.2.16 Released

Hi, The PHP development team announces the immediate availability of PHP 7.2.16. This is a security release which also contains several minor bug fixes. All PHP 7.2 users are encouraged to upgrade to this version. For source downloads of PHP 7.2.16 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: http://php.net/releases/7_2_16.php Downloads: http://www.php.net/downloads Windows downloads: http://windows.php.net/download Changelog: http://www.php.net/ChangeLog-7.php#7.2.16 Many thanks to all the contributors and supporters! Sara Golemon, Remi Collet php-7.2.16.tar.gz SHA256 hash: fb95e0bb69caba1dfd3bbac4eeef7a0485e5ea3d6191d35ad5657e18243aa02d PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcfljrAAoJENyf+NPuWvJ/PeIP/2yVxEJHXpUgaTl/cZz3sF45 4K9uQk/IGyAGC9/FNT1nbNxV+LVBIeiQDacUwSgTzNWuNmTzYF5af1V5/bMY/CEd tyTzq3rntJghFGOr30AH9CrFHdxPvGYJ3mwLkpyYNEa3vGrMD83iYZ8Q4YBVM52W ljisfgFsVFQkGfDVBeF2zhD+BtYUHd4fhKBf6siAv1ujJj/YtC6ATmNXLb7e6uBv mOXL6qmsvs8FMB8PeyDmC6ExZphlFBPESK8crgdiPbJSCNRNdpZKJsvlXcCW66Eu FH2eU9y02jZ3orrrKax1ArlSBiEWNBlvtyOXTdOlYddH1HGvkq+H+16ShU4zfnC/ aOfFo1a4GACrv9lEp9yZ4h0AUViZJeJkwm9VEESdJiK64cBVUgKD1S7CWYQnpXHG lrjVjEkqNj6Ko6KeH6kNXRi9/x9r7fxwWkH0FtsEfG06f83su3V169Q2CMB29ERg 2Jx2Y7S5AH/Ho8UUImZrfcurly8t/sdG1aO68Ql1uoa/UKy17sGrRLbr3/vO0snD OofFemeh7lKiMUFNcPssS/CV5GB3PE9gMHbeKArtJmAIbsxxaq/65ufgm++QEjia 69buDC8CUShKJQ8AWQCk2EWAcKKadj6dXyKcc3mc1jQSFmY8o6f46kX3RTwAd73I Gi95wrhb36SRcrpHCzBJ =kWTj -----END PGP SIGNATURE----- php-7.2.16.tar.bz2 SHA256 hash: 2c0ad10053d58694cd14323248ecd6d9ba71d2733d160973c356ad01d09e7f38 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcfljvAAoJENyf+NPuWvJ/SOgP/A/TRGKPAYyQMndDqPXgmp7v 5vDQ4n1Uq5U6Fi0enbzE6qz/9K8Xo2r0Zb4dkNsRrfu5u8sbvoiPXwNbO71H3Fsk 4oofzr462oMR1Ui9GOFkV1PBvyx0h0jBjM0cFOy8reEFKZs/8k9DSxPChwhmwAy4 F4wiVyo5zmLt7Te50JUslZL094Vtj4MGl7leIZSZRMAtLYgGNO5oCw9g9C/U3msv YZhhC3gRYzGKHZgeV4cF96o+d6zLEsHl2ZAkADJEsV0iwau3lJiRDmzh38mK+G4B ib/O3VIW+cnz9bZHxsclnyxFNngLhxtaDp7ufEDrFMbsn4GME/sV8j8mRkIGI7EQ e5s7XO5Hb5xqYN4qypeFbgyt3US/GknqBxPowpJvzwOyPu8/MKZNWFWTXdm3Hqm/ 4U9wNpe1FH9IlKN9YPBcJHCXQdzNrV1Z9zHCeh1WiACW94BYpaNGtyyrybfufVG+ i2gf7i4R4vzyPdNuTCs3P/27TqSQxPjks7oQjgtnKqfONTqHaKVULOCstpH4CtSS FbD3t3oiaLWtQf85YHccG8MdYN5pAN4NaMCaOQMVSp3BTi79gEQU6yyymD6pkCdB Ms17y3aS8A9pZGIfq8DeM0CNY95zlfbMHzyeKxDD7g+G4JdyUMrv+dc2TIVc8mNI Ho4g3XlQOnteNoyOPiB6 =gAgu -----END PGP SIGNATURE----- php-7.2.16.tar.xz SHA256 hash: 7d91ed3c1447c6358a3d53f84599ef854aca4c3622de7435e2df115bf196e482 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcfljxAAoJENyf+NPuWvJ/Q2wP/0YM8FMT5y32Rn43isLMn662 RWNImFx4vIQGLvgMgw32gm32mntN0vo5lynOvtDv7dUf5mDadT+M6JcIJEMvYQae OLUhMuLfeNzmZKNfXMNT7gmQcrhWRw0Zbuoe8DtRLfc78jQMQE/Xvf2gt3wfp8V0 Zs6NSFCQeWP2t4DKK5Vp5su+3Xq+ZHlVp2OhNsgc32THTfxyrB4ba+WVPq1fbESQ WOAh88ufqN1SIBeLm6peAU31oULgdplwS9Fnz+1SLVW9FAUSW8sFtmO35Gljxc2J Qp1wrv26Wwr/YSIgRAxJkeCkEyCGpvohYPfsonoFn5uegiUVn+KSbv5g0MKvzC4g sLcMbnLGhgDBmFTpH6xPwWYzoNCethBBhGvGZjdBo0nk2AhIPh2xdW45pys3Jb4H X4p0vJYeEzvLXGRgIDuthIYta0ifX9/X5ia51zculKbnBXKq+DYM6G423TN30+Q3 OqNxaizI4JeZ6oX2sGzJg2BPP5DmIM4vcunG8RvRQVzbetpU8KqHKSWDV1pd7XwJ 90ebDmXPyWpPElYgSP/zvaU4VtstRTTBTmlt1ccvsgXIkRcDUCXzHinkrDe23qfq t3EykWN5Uozj1mBQq2p2IZfTrTFnz42W/suAOwblP+fcDoz7aY5sH7ddwsv6nM2Y sqvj+R/PYlT76u8cXNxT =G2ve -----END PGP SIGNATURE-----
Posted on Leave a comment

PHP 7.3.3 Released

The PHP development team announces the immediate availability of PHP 7.3.3. This is a security release which also contains several bug fixes. All PHP 7.3 users are encouraged to upgrade to this version. For source downloads of PHP 7.3.3 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: <http://php.net/releases/7_3_3.php> Downloads: <http://www.php.net/downloads> Windows downloads: <http://windows.php.net/download> Changelog: <http://www.php.net/ChangeLog-7.php#7.3.3> Many thanks to all the contributors and supporters! Stanislav Malyshev, Christoph M. Becker php-7.3.3.tar.bz2 SHA256 hash: 61969e943adfea79701a34b8e701edd3f95be829d16601a4aabeb05f83023ce6 PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlx+fzAMHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2g+EQAJI191/VSoJ6u01470gb5iDgXqAP4jWvAx4bYoRy O76INxU2Myp4ou+qhquJJBvyPZB5YbswBjRo03XIz4aEwRptdIQwdTUZW9Jg4DI3 PHNMIh2yKbm7N+Z8cquymQ7kdnvG1G/bGY/q9kQMyncHRgI9bfD/oyztkiWKF3/9 3BHCUQN87I8wlrzosCfC6XgN8mfZLHj7zFeEzcBTSfdHaIPFD3w/gRHTsMVQ++PB xSQTJz17rirGhYqdny3X6++CyMyTkUwgBaiIAwyTj2d1kMN3o1UkaJvs/rutgQjt seZ8qBMnVIGQLEbQmNNYjPTNceBABkHz+1m/gfeqA6J1zOEoK7vlMAjO8aTETTIR WL0T39rFgA5454gyuJJ4MZW7StaJHJiwPuAmjUPIe66H4tyLzMopREbO/YPf/Eg4 9ohh+3Qa3l1lGoCQ68Bqt8u/MGfDdV4wDh3PnYPxDKjCgtu3Nv+SY+mV+OB0unXj NrocLKtxZKLOoLnAzqF15V1fJmy7w1zvyR4DveLh+QZYEt9XP4a4D+0MHZiMvkEm 8snww9EuThxZ7RaZcZ5KE1mdVTSDUQubbKKepqqMi2d50xXe50v5Dz+5RepF3Ptf SPm8iPgAw/djyXQn193ZzP+IeV1tZEwlk+H7VHEsmYL38P+idc9nEsfsNBa6O21F tl2S =hF4y -----END PGP SIGNATURE----- php-7.3.3.tar.gz SHA256 hash: 9bde40cbf8608ae9c595a6643a02cf0c692c131e2b3619af3fd2af8425d8e677 PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlx+fzEMHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2D3MP/jow6UftfATeW1DQVgz6J+y4T7J1BN9P63lzKKFw S7wZwb5NBxBXYgdLDqDGniKkxpDyi755G47rP6asaEeVeM3OFh9EhTvtmAL+k+PL b5T1/E2rHtUg+xQZo/9CbxgFlqK/zfXExhtDSM9hIr4AmIuhC+MKWT/BgTdedajL 0MtbF79pWNSX+A1U0FY+kh6bTqcdZmuw69JDprGPUL4xRKKrXw+H5wwU03zEbiEr ngszKhCaxbYnKBlMKlsd8FxBUPOBszC9AkHZzzo/0fadAmT9178Ya6YQZcWg7Y6B o3KmfHII3Vltry0Cqn61H4qfD5lNpYsw2RhnkYytUaXz34lzA1h7whsjLqEN+Vki YJfSqXMXJfzZpORb5Ngw/YjzcQhbzjZHkbAAI+/keZNlv2fiUWL9qKpYaJ/4ckjs PP07xEnn+WDQHYjhTUkt2YPad3eXU8Ceuuq5gFMSQci/dEWdmUxW3xWX9PJGmnD+ Xv0lmMKAbLBmby2H2c0eq0pTCJYGxdtFzDw79zHmpgKtfnGhwNjeO1698jflh+7S pvdL5pNeta880fBK6fCCW0p7G+xFU9mfzZwh/mX5e/gFKr2HMyesF8O522Y4MenT mjrfVMJ4xloI2qimnJjL+XnO32gOZuLW4DPkudZpaj0TmhqdKPgOItyHGDUqVffb gLZC =1F0h -----END PGP SIGNATURE----- php-7.3.3.tar.xz SHA256 hash: 6bb03e79a183d0cb059a6d117bbb2e0679cab667fb713a13c6a16f56bebab9b3 PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlx+fzEMHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2/+QP/17xwywY4MuIIiTmMLcIwYAcfwQNBa9OHDON36Ve erWcquUe4kkku3oVBpCzdNol9X6HL/sM2/LbUmRbf3bkIMcou7/1ckTJsCa4rXN8 ynlDGoTvzluy0VXvvHjURcBaQtoQwRl6N9JR3MSJOTFH6m/uM7/Co0ZmhN0JO779 ZphtipvRvkGWsFD/8MJZKiUGgtybESLE0yccX5yhuiXlGmXJYCfrDWX5iV247KLe 2Ywj4tQApg5HcjNYGn0yGzFOcpHVce5vDYk40DB/DCGJee99j975RlP7igrM+y5/ VSdKBhoHd4BSi6abNfKnjKtTRQo7vHIxBUumpGJjfpLSrQi2STTi5indGHSkBj1m yG641iWTL05HVdereiQm7A4qAChendcx4iHO/0F0WAt2K9eBDtELxd5grWhOm+Ga 1H3bmMe0DBKRoqgGhM6bmSyrzEs1+Hi5l1TMTeZLCsYy9Nke+Mx+YkeWJhlX+lGi ArGFOzh+log1TrIbURlS7+FC3no0ACZaZMT1ECQDliSBLQ/MpGutRn8JT7KH7LVj vuiwdWgzb/Pz8GAFxSu5EFk3Sft1NlRC/HgbTC1Of7iZRrXBvNbzckFJd853kIRq WfuMsvWzoAVNEok489caHzJHt77DIk9OydLuQ5cHk54avkep2MgfeJayR8sLGRT9 QpJG =moks -----END PGP SIGNATURE-----
Posted on Leave a comment

PHP 7.2.15 Released

Hi, The PHP development team announces the immediate availability of PHP 7.2.15. This is a bugfix release. All PHP 7.2 users are encouraged to upgrade to this version. For source downloads of PHP 7.2.15 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: http://php.net/releases/7_2_15.php Downloads: http://www.php.net/downloads Windows downloads: http://windows.php.net/download Changelog: http://www.php.net/ChangeLog-7.php#7.2.15 Many thanks to all the contributors and supporters! Sara Golemon, Remi Collet php-7.2.15.tar.gz SHA256 hash: 9b13bde9f5a32d6f6bdb8b911bb55bb818d0c4073538f8dc48aa2deb560f55a3 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcWa+FAAoJENyf+NPuWvJ/YkwP/imnIBuQpLXd1Ya7ZGLwzqDB 3bOm8WoqPfey5Pih8DseJqGJbMCDMavzBNGjIdlXztHmAB0o39iXUIrSoWmlpAVg I7/RBDp0IJ/ipbonTqIlHyGD/ACoUbaerj6xGT1YeY36PxDtfermwK6+hVocBkjq QJbgaowVb/Rb/qgc7m1Ge29q+xyN6IQb/fLEOfuBS8+gpCNO8NkGc9KWGpXacBX/ Utow35Z16Hdk4SQugSNNA5+N7aSdQ7arXzZB94e69lmYN1DXz0ye5zxKrzlOyXfL aEauyLAYO6n0I4UkI/+NwiOSobKi5gxLNb0sjM9TnXQWDC9r9zyNMgn+CNFqvf+T txH7SIbLnDHU5bAGTaXRDDcjg/mGbSJ3umorKLSVV9O3eBaTk5xf+IQfKUj//5c8 BFZjkQKdMYemV6ZcdRznx8HAi/VvB5aSp5WlsFsszpvd1bantQUg05DxjlmIVosO a0EH1/VKKLMiH7vProqj5Ijw7cCY92ls2YVR8iOhtmwqpAUPYw1T7RfaSkC921vM t+D7SEyiWS2DCrzUwnq7OMZ1pl37NPV6nA+y5yom9Vw0hagZPRo1sbjEx+r1o69l Lav56MocFWTo4kc/r8tKh85ylc+Swhz+RvIAXDn9XU07oaCAMvg/6aysfssinJBb eGLZ4eGJJ0rxkmC/b87c =QGfE -----END PGP SIGNATURE----- php-7.2.15.tar.bz2 SHA256 hash: c93e7616946a463911818c7e9f9e21276c7793fb8c7cb15877188dd0546d0554 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcWa+IAAoJENyf+NPuWvJ/h7gP/3ZhvpzmRA0vrwCS4tstaLhe uEKKb8JU0/FbeAM0lQ01InrzZ47e/tybMneAkIW9OZeTs/YOEawqvE+xFr2Hwa9z P4743wPnijEP07f+8GphmuJoHxV1nzVXwAAe7dzc8Nc+W+XKRmYPOG5i1SmDsSiK bXVl33QhzJBMiy18BKvj2RAGXSWOCWA3gZAoUfllCizUtoUMPRMoMXwhWo0wUWsc qtcCHac3Ug0gw6CKniqTmAgy6dHPfhfqqlNes7tCtIb38Y6YdhjX3O8Mjhn+4mbm cRXVT+RnrZfSTUXIkXB8uabYGhRGkiWBNwHYW9o4Mo+m3+pwXC0xplbyrElmvSM9 YSTp4pz36fJbbxNV6pWwJtxnAvPyhuCHXPjw6IMcVUnlasUGKnzuuneZ3KlhMZYc FPUTy+IqpBw716MJEbGjtA57lw75GwJdCWucvShADPfSItAtUoT1MBu7d0ZP8I5b NLQZA/U6VZWhjtJFADtSqPYYH5AUoh+mZW93IjsXf5BNNumiTznXG/80GEWyWmKM xqL+8FQPb+Kdt79ACEV+zkrS12bwde3pyIlGBLDR6Wvy/pxZGbBtoks1azgTYZGZ R94blBzAKDpcz4WFHAgtW5sVyCu9a/mx4k5ooGQRS3OkZEPkqiyQ8G84YPbL5PkL kKZePlwIRSl5yg9sE2Ah =4osw -----END PGP SIGNATURE----- php-7.2.15.tar.xz SHA256 hash: 75e90012faef700dffb29311f3d24fa25f1a5e0f70254a9b8d5c794e25e938ce PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcWa+KAAoJENyf+NPuWvJ/IZ0P/jpxMWtjyWGuaRRkqc2khTlH 20mW4xe+3t+AQxPqmJD6NsUOLcaF8uPakivLOTjN7M902Kj0pYwrDzBqu1AVRsYB 857+/+TjvP8u+RdSh6GFCp9B6bjvgRduycbgqgwYkPaYir32U947Sr+YPNmwJIrg 3pQK4e+nJpS03laZTAUmkKLBbLJilSNv2ZKgE0bQZd6FOJPnObNbRK7cG9pZNNKB 88aQEZwjPoamKmLrZWhnz+qZfNpaiaPHg7Vnkn5qnJ41tHLHp5JC2THHRXnJ1lUF bZ3y85uu4udv2ggPbd+fPKGwrIn0s294EoCtfuAL4EhgrTYzAwAD6Reeo6vc80MR jmb/yrx3e/ZbW4JvONq6qgH6ny3vVbmI+cIf25pCN82qXmip6FDIpgq4wfVT7tJt IisYqftZ/Il2nfbm/NJ4eH2exsBEHJldFnU5OGaE2mFKvvXrV4cnXbw32BcRylg7 UJyguaIO5vyW0zKxP2pHV8+siXVp/VO6AVtTdkU50xAZg9v3AqA8E1545TpV+tAt yd2nywmXP8HUKmsmUGI4Bu2Xdo+3ZXPPZDK/0lov2x5ZZjh+7pgyq0sXrW8Tku26 a6j/6RuJReECZ5LPX8ukD9sCtIuo1OsFFmoNlJVggsLPRKJDpnSvD+C1RNXfrFYE 5VtCcM10gNowC6Kxli1a =P7/F -----END PGP SIGNATURE-----
Posted on Leave a comment

PHP 7.3.2 Released

The PHP development team announces the immediate availability of PHP 7.3.2. This is a bugfix release with several bug fixes included. All PHP 7.3 users are encouraged to upgrade to this version. For source downloads of PHP 7.3.2 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: <http://php.net/releases/7_3_2.php> Downloads: <http://www.php.net/downloads> Windows downloads: <http://windows.php.net/download> Changelog: <http://www.php.net/ChangeLog-7.php#7.3.2> Many thanks to all the contributors and supporters! Stanislav Malyshev, Christoph M. Becker php-7.3.2.tar.bz2 SHA256 hash: 946f50dacbd2f61e643bb737021cbe8b1816e780ee7ad3e0cd999a1892ab0add PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlxZjAwMHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2yGYP/jzznjS2h4XLxELKwjNk71uMAwqcDYNM1/oV+4qR jSksj83jgC7EZ4iCer0w0sWvk5oLVUfX8AFRH+dPPcnB21G4+dfBG2YnEUAZIohG iavPaIketAkuAiFWa/SrorrllYam58gQzbnKIAHDH0h1RCKGHjPwDoaVGHC0KRCw qqWUmx20XKcVzR4zeLDOKGdzmBJqucJwLA1Z1FhMnXN6keFnXu6m8rAire390Ppo J/FjXqUq5CUoxZnd5KFVIB5VDHRevIoMVvd6wB8bng20bl4M6KEsC9LNI+X3gIfq Uj321K5LBkgGhva32bVb2cGydZxSpluMEEU8maLkXa235cZ3EXOGD4NGi6PAPm07 9Wf/wwTS/E8+YR5HShZDMRcPhdU2wAAFYRnBYbD1ze3YRuYlgF4pO+FfuHSzmBYV yZVUeccu2SFQSt7UvonSrbfO07U1lVisVltRwJw6g/hVFn74JHpQJJL0m0PV5LcG uD3Qsf4CMfWrfI1LAr9/qPzPggapAeE5Y+yIjavP1XlaKsOtOYblnBCnwTkkngLW sjWJEGClbZxcLL15Q1E8AmJsRn9w/eGZfdDRs65RTrZsG1RmQlW5WUBuqAI/Yhfw PD5sg1U85ZKKBajdieQFr2Yg1No0uhyraB7PS5ZJiKhzeDeeMvBy+cgU9BVXdjwI qZpp =tqro -----END PGP SIGNATURE----- php-7.3.2.tar.gz SHA256 hash: 4597294b00edc1c63a021b6c7838eb43384f62eeb9e392f0b91c38a3c090f499 PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlxZjAwMHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2VGMP/R2V+DjWkthyOSIZ76/fdLkMPAr3qc8ubKRUJ4AX Cwr+QDUuUr3kQGa+MPOgB5/x7acq3AZKRoGOe/yUW+uqeGXS5ImZ7HsBaGUAh0i/ 4B3MLE6wHRdQ/sF6dmrXs4BwFePtpZoOUiZxH84LDJdWX6/bejVHql3jv+k0+u00 pUexK7XyG1ricLyd6KGoC6MxX9FP+U7N8S0zzGmmsOLJ6TsXtn8mjIGFN3bUS5T4 0AonJ+418LUcQ59n3y8P0uNmCNa8flFZRI+RFfnxoIosKEck90m60jnW9yM/pP16 Yr6Dn3x9IEPaKJPGKeMsZfaO6f2ZThuRQ7ZyHvFeEWLb9q30ydG3ghr86x/Qjdgv 7AvLUhMZr4nAJbuZ6aMVQX24+HjsXZSxRx/OOn9lBGxXwTNKt4vepj54MTQ8P1E9 1QgDpR42E/vtPYOEZHcz2eOZB5gE0fnWMtzNL92CWaf3ctUG8yz5ugKhISbeDZxG VAo55mCR8suAYMfBXrD4vwOMbRCzrMso5nTnqxDreBFrxRRcrkIdDbIwGzyBKZkW mhw6kwvNpjjI6xQlPqIAG5lYg51JWpbauIC0jBzc8L0KKY2kPbgmvGVVjk7bxa2v rFYl4bOXyE3/IdtW1r5may62iaGFVXVuYFR55xsY0dkFHMQSsHDCsFIsT8OpYrU2 3FYP =K9bv -----END PGP SIGNATURE----- php-7.3.2.tar.xz SHA256 hash: 010b868b4456644ae227d05ad236c8b0a1f57dc6320e7e5ad75e86c5baf0a9a8 PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlxZjAwMHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2SwIP/iAxmiW3g37vP113ym+hpP1vPJ5ZJAcSkid7eUtx xWR15yoO18Q5ouVUwOnbpe0F68O+NuUwjqFqI41Pq0paChsCqi2SxGZLmBwIcUr0 LqRND4r2DocfklMIjlD/MnM8XVm4eOEUy+/ExnCC/sVVGFW+4gn5JzDvyS8wm2Vn T9pmZF7uhI4qx+bAD7Zvz66j+aCjbP9nzqv74PqYoKuAxLln+yQB4jKeR+lDNpBI HRbLnPc0DJhq1obwnhTw4Kj7GPoJBXd0XzH6x6Rhwn5/5WAEYQuIALcHDBPEERRz h//mdugHcljL+3YaVspeQ45lFCW8nYoGFaPZLSBMyUZltFEHfTBWmROLzJRVIm+R sJQa+wwBJ7r26AFg53de/6epAALf41wBcVs966A1+rZo11L4ChXKoNzoR7Cq469X g9b6feTvjhkicvD2PvVw8PIk08znOeMVxh4JrwM6nJKIsc8pN3xko6ZNeCWrB5EW ebbps3wCswIjd6edkq/WJYqkZ/BtaOOl/iNbDfUChtGli0KjKux7GfGCmS0UsRya uSrRJotQuWtqUUZYLEAuV84UxYAtK7atvfOD+GVlQQqoaQTw1mAHjBQYSj4ouvj1 HeYynJ4ZYR7YIs0l68pTnGQXB5XQv6XcFaoOUK2ruRWmqXERM6EJCUuiOeqclW7I HMFo =A1N2 -----END PGP SIGNATURE-----
Posted on Leave a comment

ASP.NET Core updates in .NET Core 3.0 Preview 2

.NET Core 3.0 Preview 2 is now available and it includes a bunch of new updates to ASP.NET Core.

Here’s the list of what’s new in this preview:

  • Razor Components
  • SignalR client-to-server streaming
  • Pipes on HttpContext
  • Generic host in templates
  • Endpoint routing updates

Get started

To get started with ASP.NET Core in .NET Core 3.0 Preview 2 install the .NET Core 3.0 Preview 2 SDK

If you’re on Windows using Visual Studio, you’ll also want to install the latest preview of Visual Studio 2019.

Upgrade an existing project

To upgrade an existing an ASP.NET Core app to .NET Core 3.0 Preview 2, follow the migrations steps in the ASP.NET Core docs.

Add package for Json.NET

As part of the work to tidy up the ASP.NET Core shared framework, Json.NET is being removed from the shared framework and now needs to be added as a package.

To add back Json.NET support to an ASP.NET Core 3.0 project:

Runtime compilation removed

As a consequence of cleaning up the ASP.NET Core shared framework to not depend on Roslyn, support for runtime compilation of pages and views has also been removed in this preview release. Instead compilation of pages and views is performed at build time. In a future preview update we will provide a NuGet packages for optionally enabling runtime compilation support in an app.

Other breaking changes and announcements

For a full list of other breaking changes and announcements for this release please see the ASP.NET Core Announcements repo.

Build modern web UI with Razor Components

Razor Components are a new way to build interactive client-side web UI with ASP.NET Core. This release of .NET Core 3.0 Preview 2 adds support for Razor Components to ASP.NET Core and for hosting Razor Components on the server. For those of you who have been following along with the experimental Blazor project, Razor Components represent the integration of the Blazor component model into ASP.NET Core along with the server-side Blazor hosting model. ASP.NET Core Razor Components is a new capability in ASP.NET Core to host Razor Components on the server over a real-time connection.

Working with Razor Components

Razor Components are self-contained chunks of user interface (UI), such as a page, dialog, or form. Razor Components are normal .NET classes that define UI rendering logic and client-side event handlers, so you can write rich interactive web apps without having to write any JavaScript. Razor components are typically authored using Razor syntax, a natural blend of HTML and C#. Razor Components are similar to Razor Pages and MVC Views in that they both use Razor. But unlike pages and views, which are built around a request/reply model, components are used specifically for handling UI composition.

To create, build, and run your first ASP.NET Core app with Razor Components run the following from the command line:

dotnet new razorcomponents -o WebApplication1
cd WebApplication1
dotnet run

Or create an ASP.NET Core Razor Components in Visual Studio 2019:

Razor Components template

The generated solution has two projects: a server project (WebApplication1.Server), and a project with client-side web UI logic written using Razor Components (WebApplication1.App). The server project is an ASP.NET Core project setup to host the Razor Components.

Razor Components solution

Why two projects? In part it’s to separate the UI logic from the rest of the application. There is also a technical limitation in this preview that we are using the same Razor file extension (.cshtml) for Razor Components that we also use for Razor Pages and Views, but they have different compilation models, so they need to kept separate. In a future preview we plan to introduce a new file extension for Razor Components (.razor) so that you can easily host your components, pages, and views all in the same project.

When you run the app you should see multiple pages (Home, Counter, and Fetch data) on different tabs. On the Counter page you can click a button to increment a counter without any page refresh. Normally this would require writing JavaScript, but here everything is written using Razor Components in C#!

Razor Components app

Here’s what the Counter component code looks like:

@page "/counter"

<h1>Counter</h1>

<p>Current count: @currentCount</p>

<button class="btn btn-primary" onclick="@IncrementCount">Click me</button>

@functions {
 int currentCount = 0;

 void IncrementCount()
 {
 currentCount+=1;
 }
}

Making a request to /counter, as specified by the @page directive at the top, causes the component to render its content. Components render into an in-memory representation of the render tree that can then be used to update the UI in a very flexible and efficient way. Each time the “Click me” button is clicked the onclick event is fired and the IncrementCount method is called. The currentCount gets incremented and the component is rendered again. The runtime compares the newly rendered content with what was rendered previously and only the changes are then applied to the DOM (i.e. the updated count).

You can use components from other components using an HTML-like syntax where component parameters are specified using attributes or child content. For example, you can add a Counter component to the app’s home page like this:

@page "/"

<h1>Hello, world!</h1>

Welcome to your new app.

<Counter />

To add a parameter to the Counter component update the @functions block to add a property decorated with the [Parameter] attribute:

@functions {
 int currentCount = 0;

 [Parameter] int IncrementAmount { get; set; } = 1;

 void IncrementCount()
 {
 currentCount+=IncrementAmount;
 }
}

Now you can specify IncrementAmount parameter value using an attribute like this:

<Counter IncrementAmount="10" />

The Home page then has it’s own counter that increments by tens:

Count by tens

This is just an intro to what Razor Components are capable of. Razor Components are based on the Blazor component model and they support all of the same features (parameters, child content, templates, lifecycle events, component references, etc.). To learn more about Razor Components check out the component model docs and try out building your first Razor Components app yourself.

Hosting Razor Components

Because Razor Components decouple a component’s rendering logic from how the UI updates get applied, there is a lot of flexibility in how Razor Components can be hosted. ASP.NET Core Razor Components in .NET Core 3.0 adds support for hosting Razor Components on the server in an ASP.NET Core app where all UI updates are handled over a SignalR connection. The runtime handles sending UI events from the browser to the server and then applies UI updates sent by the server back to the browser after running the components. The same connection is also used to handle JavaScript interop calls.

ASP.NET Core Razor Components

Alternatively, Blazor is an experimental single page app framework that runs Razor Components directly in the browser using a WebAssembly based .NET runtime. In Blazor apps the UI updates from the Razor Components are all applied in process directly to the DOM.

Blazor

Support for the client-side Blazor hosting model using WebAssembly won’t ship with ASP.NET Core 3.0, but we are working towards shipping it with a later release.

Regardless of which hosting model you use for your Razor Components, the component model is the same. The same Razor Components can be used with either hosting model. You can even switch your app back and forth from being a client-side Blazor app or Razor Components running in ASP.NET Core using the same components as long as your components haven’t taken any server specific dependencies.

JavaScript interop

Razor Components can also use client-side JavaScript if needed. From a Razor Component you can call into any browser API or into an existing JavaScript library running in the browser. .NET library authors can use JavaScript interop to provide .NET wrappers for JavaScript APIs, so that they can be conveniently called from Razor Components.

public class ExampleJsInterop
{
 public static Task<string> Prompt(this IJSRuntime js, string text)
 {
 // showPrompt is implemented in wwwroot/exampleJsInterop.js
 return js.InvokeAsync<string>("exampleJsFunctions.showPrompt", text);
 }
}
@inject IJSRuntime JS

<button onclick="@OnClick">Show prompt</button>

@functions {
 string name;

 async Task OnClick() {
 name = await JS.Prompt("Hi! What's you're name?");
 }
}

Both Razor Components and Blazor share the same JavaScript interop abstraction, so .NET libraries relying on JavaScript interop are usable by both types of apps. Check out the JavaScript interop docs for more details on using JavaScript interop and the Blazor community page for existing JavaScript interop libraries.

Sharing component libraries

Components can be easily shared and reused just like you would normal .NET classes. Razor Components can be built into component libraries and then shared as NuGet packages. You can find existing component libraries on the Blazor community page.

The .NET Core 3.0 Preview 2 SDK doesn’t include a project template for Razor Component Class Libraries yet, but we expect to add one in a future preview. In meantime, you can use Blazor Component Class Library template.

dotnet new -i Microsoft.AspNetCore.Blazor.Templates
dotnet new blazorlib

In this preview release ASP.NET Core Razor Components don’t yet support using static assets in component libraries, so the support for component class libraries is pretty limited. However, in a future preview we expect to add this support for using static assets from a library just like you can in Blazor today.

Integration with MVC Views and Razor Pages

Razor Components can be used with your existing Razor Pages and MVC apps. There is no need to rewrite existing views or pages to use Razor Components. Components can be used from within a view or page. When the page or view is rendered, any components used will be prerendered at the same time.

To render a component from a Razor Page or MVC View in this release, use the RenderComponentAsync<TComponent> HTML helper method:

<div id="Counter">
 @(await Html.RenderComponentAsync<Counter>(new { IncrementAmount = 10 }))
</div>

Components rendered from pages and views will be prerendered, but are not yet interactive (i.e. clicking the Counter button doesn’t do anything in this release). This will get addressed in a future preview, along with adding support for rendering components from pages and views using the normal element and attribute syntax.

While views and pages can use components the converse is not true: components can’t use views and pages specific features, like partial views and sections. If you want to use a logic from partial view in a component you’ll need to factor that logic out first as a component.

Cross platform tooling

Visual Studio 2019 comes with built-in editor support for Razor Components including completions and diagnostics in the editor. You don’t need to install any additional extensions.

Razor Components tooling

Razor Component tooling isn’t available yet in Visual Studio for Mac or Visual Studio Code, but it’s something we are actively working on.

A bright future for Blazor

In parallel with the ASP.NET Core 3.0 work, we will continue ship updated experimental releases of Blazor to support hosting Razor Components client-side in the browser (we’ll have more to share on the latest Blazor update shortly!). While in ASP.NET Core 3.0 we will only support hosting Razor Components in ASP.NET Core, we are also working towards shipping Blazor and support for running Razor Components in the browser on WebAssembly in a future release.

SignalR client-to-server streaming

With ASP.NET Core SignalR we added Streaming support, which enables streaming return values from server-side methods. This is useful for when fragments of data will come in over a period of time.

With .NET Core 3.0 Preview 2 we’ve added client-to-server streaming. With client-to-server streaming, your server-side methods can take instances of a ChannelReader<T>. In the C# code sample below, the StartStream method on the Hub will receive a stream of strings from the client.

public async Task StartStream(string streamName, ChannelReader<string> streamContent)
{
 // read from and process stream items
 while (await streamContent.WaitToReadAsync(Context.ConnectionAborted))
 {
 while (streamContent.TryRead(out var content))
 {
 // process content
 }
 }
}

Clients would use the SignalR Subject (or an RxJS Subject) as an argument to the streamContent parameter of the Hub method above.

let subject = new signalR.Subject();
await connection.send("StartStream", "MyAsciiArtStream", subject);

The JavaScript code would then use the subject.next method to handle strings as they are captured and ready to be sent to the server.

subject.next("example");
subject.complete();

Using code like the two snippets above, you can create real-time streaming experiences. For a preview of what you can do with client-side streaming with SignalR, take a look at the demo site, streamr.azurewebsites.net. If you create your own stream, you can stream ASCII art representations of image data being captured by your local web cam to the server, where it will be bounced out to other clients who are watching your stream.

Client-to-server Streaming with SignalR

System.IO.Pipelines on HttpContext

In ASP.NET Core 3.0, we’re working on consuming the System.IO.Pipelines API and exposing it in ASP.NET Core to allow you to write more performant applications.

In Preview 2, we’re exposing the request body pipe and response body pipe on the HttpContext that you can directly read from and write to respectively in addition to maintaining the existing Stream-based APIs.
While these pipes are currently just wrappers over the existing streams, we will directly expose the underlying pipes in a future preview.

Here’s an example that demonstrates using both the request body and response body pipes directly.

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
 if (env.IsDevelopment())
 {
 app.UseDeveloperExceptionPage();
 }

 app.UseRouting(routes =>
 {
 routes.MapGet("/", async context =>
 {
 await context.Response.WriteAsync("Hello World");
 });

 routes.MapPost("/", async context =>
 {
 while (true)
 {
 var result = await context.Request.BodyPipe.ReadAsync();
 var buffer = result.Buffer;

 if (result.IsCompleted)
 {
 break;
 }

 context.Request.BodyPipe.AdvanceTo(buffer.End);
 }
 });
 });
}

Generic host in templates

The templates have been updated to use the Generic Host instead of WebHostBuilder as they have in the past:

public static void Main(string[] args)
{
 CreateHostBuilder(args).Build().Run();
}

public static IHostBuilder CreateHostBuilder(string[] args) =>
 Host.CreateDefaultBuilder(args)
 .ConfigureWebHostDefaults(webBuilder =>
 {
 webBuilder.UseStartup<Startup>();
 });

This is part of the ongoing plan started in 2.0 to better integrate ASP.NET Core with other server scenarios that are not web specific.

What about IWebHostBuilder?

The IWebHostBuilder interface that is used with WebHostBuilder today will be kept, and is the type of the webBuilder used in the sample code above. We intend to deprecate and eventually remove WebHostBuilder itself as its functionality will be replaced by HostBuilder, though the interface will remain.

The biggest difference between WebHostBuilder and HostBuilder is that you can no longer inject arbitrary services into your Startup.cs. Instead you will be limited to the IHostingEnvironment and IConfiguration interfaces. This removes a behavior quirk related to injecting services into Startup.cs before the ConfigureServices method is called. We will publish more details on the differences between WebHostBuilder and HostBuilder in a future deep-dive post.

Endpoint routing updates

We’re excited to start introducing more of the Endpoint Routing story that began in 2.2. Endpoint routing allows frameworks like MVC as well as other routable things to mix with middleware in a way that hasn’t been possible before. This is now present in the project templates in 3.0.0-preview-2, we’ll continue to add more richness as we move closer to a final release.

Here’s an example:

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
 if (env.IsDevelopment())
 {
 app.UseDeveloperExceptionPage();
 }

 app.UseStaticFiles();

 app.UseRouting(routes =>
 {
 routes.MapApplication();

 routes.MapGet("/hello", context =>
 {
 return context.Response.WriteAsync("Hi there!"); 
 });

 routes.MapHealthChecks("/healthz");
 });

 app.UseAuthentication();
 app.UseAuthorization();
}

There’s a few things to unpack here.

First, the UseRouting(...) call adds a new Endpoint Routing middleware. UseRouting is at the core of many of the templates in 3.0 and replaces many of the features that were implemented inside UseMvc(...) in the past.

Also notice that inside UseRouting(...) we’re setting up a few things. MapApplication() brings in MVC controllers and pages for routing. MapGet(...) shows how to wire up a request delegate to routing. MapHealthChecks(...) hooks up the health check middleware, but by plugging it into routing.

What might be surprising to see is that some middleware now come after UseRouting. Let’s tweak this example to demonstrate why that is valuable.

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
 if (env.IsDevelopment())
 {
 app.UseDeveloperExceptionPage();
 }

 app.UseStaticFiles();

 app.UseRouting(routes =>
 {
 routes.MapApplication();

 routes.MapGet("/hello", context =>
 {
 return context.Response.WriteAsync("Hi there! Here's your secret message"); 
 })
 .RequireAuthorization(new AuthorizeAttribute(){ Roles = "secret-messages", });

 routes.MapHealthChecks("/healthz").RequireAuthorization("admin");
 });

 app.UseAuthentication();
 app.UseAuthorization();
}

Now I’ve added an AuthorizeAttribute to my request delegate. This is just like placing [Authorize(Roles = "secret-messages")] on an action method in a controller. We’ve also given the health checks middleware an authorization policy as well (by policy name).

This works because the following steps happen in order (ignoring what happens before routing):

  1. UseRouting(...) makes a routing decision – selecting an Endpoint
  2. UseAuthorization() looks at the Endpoint that was selected and runs the corresponding authorization policy
  3. hidden… At the end of the middleware pipeline the Endpoint is executed (if no endpoint was matched then a 404 response is returned)

So think of UseRouting(...) as making a deferred routing decision – where middleware that appear after it run in the middle. Any middleware that run after routing can see the results and read or modify the route data and chosen endpoint. When processing reaches the end of the pipeline, then the endpoint is invoked.

What is an Endpoint and why did we add this?

An Endpoint is a new primitive to help frameworks (like MVC) be friends with middleware. Fundamentally an Endpoint is a request delegate (something that can execute) plus a bag of metadata (policies).

Here’s an example middleware – you can use this to examine endpoints in the debugger or by printing to the console:

app.Use(next => (context) =>
{
 var endpoint = context.GetEndpoint();
 if (endpoint != null)
 {
 Console.WriteLine("Name: " + endpoint.DisplayName);
 Console.WriteLine("Route: " + (endpoint as RouteEndpoint)?.RoutePattern);
 Console.WriteLine("Metadata: " + string.Join(", ", endpoint.Metadata));
 }

 return next(context);
});

In the past we haven’t had a good solution when we’ve wanted to implement a policy like CORS or Authorization in both middleware and MVC. Putting a middleware in the pipeline feels very good because you get to configure the order. Putting filters and attributes on methods in controllers feels really good when you need to apply policies to different parts of the application. Endpoints bring togther all of these advantages.

As an addition problem – what do you do if you’re writing the health checks middleware? You might want to secure your middleware in a way that developers can customize. Being able to leverage the ASP.NET Core features for this directly avoids the need to build in support for cross-cutting concerns in every component that serves HTTP.

In addition to removing code duplication from MVC, the Endpoint + Middleware solution can be used by any other ASP.NET Core-based technologies. You don’t even need to use UseRouting(...) – all that is required to leverage the enhancements to middleware is to set an Endpoint on the HttpContext.

What’s integrated with this?

We added the new authorize middleware so that you can start doing more powerful security things with just middleware. The authorize middleware can accept a default policy that applies when there’s no endpoint, or the endpoint doesn’t specify a policy.

CORS is also now endpoint routing aware and will use the CORS policy specified on an endpoint.

MVC also plugs in to endpoint routing and will create endpoints for all of your controllers and pages. MVC can now be used with the CORS and authorize features and will largely work the same. We’ve long had confusion about whether to use the CORS middleware or CORS filters in MVC, the updated guidance is to use both. This allows you to provide CORS support to other middleware or static files, while still applying more granular CORS policies with the existing attributes.

Health checks also provide methods to register the health checks middleware as a router-ware (as shown above). This allows you to specify other kinds of policies for health checks.

Finally, new in ASP.NET Core 3.0 preview 2 is host matching for routes. Placing the HostAttribute on an MVC controller or action will prompt the routing system to require the specified domain or port. Or you can use RequireHost in your Startup.cs:

app.UseRouting(routes =>
{
 routes.MapGet("/", context => context.Response.WriteAsync("Hi Contoso!"))
 .RequireHost("contoso.com");

 routes.MapGet("/", context => context.Response.WriteAsync("Hi AdventureWorks!"))
 .RequireHost("adventure-works.com");

 routes.MapHealthChecks("/healthz").RequireHost("*:8080");
});

Do you think that there are things that are missing from the endpoint story? Are there more things we should make smarter or more integrated? Please let us know what you’d like to see.

Give feedback

We hope you enjoy the new features in this preview release of ASP.NET Core! Please let us know what you think by filing issues on Github.

Posted on Leave a comment

PHP 7.3.1 Released

The PHP development team announces the immediate availability of PHP 7.3.1. This is a security release which also contains several bug fixes. All PHP 7.3 users are encouraged to upgrade to this version. For source downloads of PHP 7.3.1 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: http://php.net/releases/7_3_1.php Downloads: http://www.php.net/downloads Windows downloads: http://windows.php.net/download Changelog: http://www.php.net/ChangeLog-7.php#7.3.1 Many thanks to all the contributors and supporters! Stanislav Malyshev, Christoph M. Becker php-7.3.1.tar.bz2 SHA256 hash: afef2b0cd7f2641274a1a0aabe67e30f2334970d7c530382dfa9d79cfe74388e PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlw0tAcMHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2a/cP+wVaHw0Jqg7CidjH/UJEnROtd4CFiK9VOQ2CBh8o T650GBSEhin7525+mH4ofSKD2M6/+8cXZ4wTCaBvCIepyn1pV78Y47fDoEZccIlR GNvgLw4NMmViJPH8CfYbIExDcfRdtLc09irFrKv9JY0mjoUCqUHUg8xIvGCP/Pb0 uxe6BRiiN11Ji+7iCfX4sA+hioAtpnCJ1LCi6IUV1lowTVFct9I/ayaI2q9ztZPK eKv3aYTqe/oOpAwYI7aByt1oaufLleGPA5iUU0mXqX5TLhcdaiaaxSkffLlEDVEE N5UOBdd7uCb8PgaB0qQoZV74jfQmV8MDHdMLxpSqL0vEzvRZpT45ZvQt7dsaF5h1 Edne9+/7Nn/w6QohuETm4/6wCD7cpZ+BbZoqBWzVyovfk5a0oGZCIsGkpx6Swr/t rneoFcpACfH3P6p/vHa+Iki4ON0jgte2g37v1BaH1OrxTM90tWDydXpNT4PYhaC+ 0CSKOKVoZ5TGWQZXDIj4w1bbYeFvfH+3oDP74NX3W262oTypNcaKOPN2R+E2deCk AJZiJAdr7OfA1bJn1fiOZI4hmgi/GvXpWqQNhWJPTj/bxwheNKcfPYpv6CxWL/NW K3VjMueBPG0rWlz8p/lWWSP1+ZvzZHovdV/lI+puYLIThcz2cwc28fYaHIQ7f6AK Sgnq =7amr -----END PGP SIGNATURE----- php-7.3.1.tar.gz SHA256 hash: 8006211f7a041dde22fffedc416d142e0ebf22066014077ca936d7e6f655ead5 PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlw0tA8MHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2sZoP/jgkG1esWDByEicS5sXNy0NVPW/VE2tIc+jEBRxV Nh8De4qaR0moU45zUABbQ4zkB7/QNi+W+cUJoK2AdXh/Un1vGLFhu8Wbm9nDGZyy 3pv/Kf52BC10UGp13oGsJtIryD1Wi88XevQV3l4NbI3gCOss0nIVkBeZI7Vfommi jiicqdZhURbWi9M2magpbm/Nu5K3h2NoRcLV894APJ6SO47sb4lR5rqdGvnQd9M1 FO7C6/0gNj+FCzGFsuOpOJf3Rh0QGZ9dy9K+3BJfUIAnFsQYingfgu2wvb7Dh5Sg NOiekfQaocYlHE5YZ0FopSOVuo0AyH/Eah8G3pF8ER+Db/e/EDSL9X16ZBHaxSkc UlttJXph5EqarsicbiIcpi/WwVn3PGw89foaJ2tXS7VT677uGkVrtMOsNFEA6mJ/ rUjK7YTz7Zds3EB7n5x/a0D0qe5qDwhO4qX3KDs0iED17MdPnzrhBRQhK2xzbWO1 wzFWdNdIIMtcrvpM/zBvY69IUYiI3DLyQBXaXhOLVGKeSibbqjscqTkeP6fSdteI Vt5+HgHFF6so6JKLJp7gdm8d+hxpAjlXj+PF8BqHn5Xdmo3n7TwrdJc9Gc6d5G+x nL4oIYl1m5tW3Kp41Z4YWqZ0AlQfn4KMOepm/BYFFlsDo/v7jyxXI5xrjrrSoyyy NC9S =xKVm -----END PGP SIGNATURE----- php-7.3.1.tar.xz SHA256 hash: cfe93e40be0350cd53c4a579f52fe5d8faf9c6db047f650a4566a2276bf33362 PGP signature: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqFiEEy69p8XOg/qS1N/Rw1myVkxGLzLYFAlw0tA8MHGNtYkBwaHAu bmV0AAoJENZslZMRi8y2jCcP/2vDID0ZugOJRGtfb0Ph3RBV87mwVk/5X97kTCSL dsKx8Rny2ZKbAd3epUrp0kXADfmzPtH1SaStR/FiJ7GC85XCvaoYcTZBijSVp3RI PMqxkrAjXGf98QJPAYdVA4c1o3g291h+2rg8+6NVXZ1ruO55UXqybqDDoH8XTw6g bAE6uVzEfndMAt1KHnhlf/6mC1aTfaFNUmI6V9AyijrOh0XU0NFrfhIGX3DQQhlZ YxdpkU7x2PEgx+lVtQSQJeKJZgZq+ToutgfAfqP5bT8tzMM4gESFEq+6I9nm5qTs KvV9u3aYGoq1KDyXbVXdi5OcOwq8K+S05lNjV8iqDPnu4Em1qfh6S+BF498fF3cL pVKf7TiVpKFIvap092W0LNDcUIK7mP91k5zfVXYxm6Buo5tOxrDyT131PyaI4rz/ 6NBGL8CBG7mtzwk65fb4Zs9vsrn9KAyE66tVyRTmp9hgw4boJhrKggeJX5VOBraE /n9ihsND8O1BOK8eKxhRyi3qnRjTIZz/4oLuSnsXVRxBWY2DalF1gsjLb2NaChaz NIZ3VPeygV5s3TPiGUqOjyl8lENKxrCUx8B8TEoCF5EBKlyRUkhQxY0CVbajj+Hv fEruL+vUdrOinhwI8OlrX/8Q/Om5CdsEeeGq+fhnR94G6doHiPczYYn4HR7O/pbq YDm8 =aD/P -----END PGP SIGNATURE-----
Posted on Leave a comment

PHP 7.2.14 Released

Hi, The PHP development team announces the immediate availability of PHP 7.2.14. This is a security release which also contains several minor bug fixes. All PHP 7.2 users are encouraged to upgrade to this version. For source downloads of PHP 7.2.14 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: http://php.net/releases/7_2_8.php Downloads: http://www.php.net/downloads Windows downloads: http://windows.php.net/download Changelog: http://www.php.net/ChangeLog-7.php#7.2.14 Many thanks to all the contributors and supporters! Sara Golemon, Remi Collet php-7.2.14.tar.gz SHA256 hash: 87e13d80b0c3a66bd463d1cb47dc101335884a0d192ab924f547f8aed7f70c08 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcNHXWAAoJENyf+NPuWvJ/ttcP/1Fxe9eqjpJocY0TdrlWA8p2 XJJyaEkaKFR7NatHqMtk3U6iq/650QoJ1kgylghnn+vh9AYPb4pb3v9uuJawpB6P yL6tr+LcuHOhGFCz5y/VODfMcjl2Qa1huFm31oGLZ5XppOaFrRCeYUQx7+8ykzbF u0YuPtO8IbrHATzK6AT0IsHPUjoBuMP46KeysYeU0QtFCuUWBQrcr5N8+tBxyyrW RVjijczVSoCepYpI8JZfSs5X7crEwzrjABHxLbnoaI6thZypVxQnelFSMKTzb3L8 K8acofP/VERpWXy5JLazRC/cLNq18p9NfkZV39jiJ8Np2zV5kNekCeVVSZnduYYZ v2kTNChkeOUG3ruM4qYLg6/LWOQW3oIZBlvSfgjEReSOIoEyiM7e16a9Q4sXzfrf oxYTQ0VFCn9yyYWAzW3HPrjbf84+a5pMD4rpEkZEvBTsc9fOHU4+2lCqI7+Eg1sS RJjfxA2Fm1ltiZ8ftwieaCL4WMzI8MsXU5ZjbaezBgNzwr2JCZPlfRFdCvmIzbp3 2Ynnmf5ilLh6RlqApTp95r/oxG8E9F6AgNBGOox5a1kFyxgEzD6IwMgwwiXrTaUX EpYd7LH6I3uj9hh8UyD2Qr268pWUQiyRv8wKMKrySBHJLZ3AoCrz+x/qTtKNevRV BaJCW4Csu0obZ8hu/3N2 =cjUP -----END PGP SIGNATURE----- php-7.2.14.tar.bz2 SHA256 hash: f56132d248c7bf1e0efc8a680a4b598d6ff73fc6b9c84b5d7b539ad8db7a6597 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcNHXZAAoJENyf+NPuWvJ/lZ0P/imzRm9JJfVtrZHkD11r9xoc ag3OeP4Z8Yb1cYS/qY757FNqQ3az7+OeCSLkAmlMnjw1rKMJoNMFGBZg4Iifw1FY C0VdsztdXULwuyAKDHkupIGw7POljxdqNFj6E40bJ2cpR5GbOHpGSVI/PsbIQToI D0HMBROE9NHNeiMhL5zYoqN0NDgF2zIke2DrjT/QM447HwuqGhXD13PxV24dnuFY Eb9MnD1WKIW567sqCqXoaWm840IduAOrEc6iUkjh399ZibnMlhhytdsjDdkge9Va SfscLLbe/S8/2mhWQuOQQl8A34hPQL60lADRcNU3QjvFkroyaiqQpo4VzmYZBRH7 e26BQRkz0VHEw8p9aBtx0KC52t62g/GGKAcjMu5fmXzas/H4Wi2ZqIJW0A9/fIOK yrGDh+FosQcy5PARRjiqgqiZfR0oa5xaM2p0qEuLtgF/T22l1/KC8NVYbXbda9I0 gNYS6JWlX5417N81iERwix/7J2sYF/hCr+TlOIjhDeyw1GfmuSjvwalfSjSrzbeA v3K23gndu5h1l6hSa/HtTNPINJoQrLbtVCdF/5tXfWlxyt39qybsPyMbRvdd2rNO uQqpR4PUD1y2eEissweMRZH/p9lj8HvWSOpQxmoewLf1xM63A5pip4d7qDcADi4V ScITFEvJUeSlPJMgYRW+ =YFNe -----END PGP SIGNATURE----- php-7.2.14.tar.xz SHA256 hash: ee3f1cc102b073578a3c53ba4420a76da3d9f0c981c02b1664ae741ca65af84f PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcNHXcAAoJENyf+NPuWvJ/kSwP/jfalF7CSBXDZ+BI8sAY1uOX hVMAmlGPkTLv9PTjAHpmMABVbHGKaZ3KPt2DqP0z8prc/hGFCR2LFAyLXFBb3RT6 Do0IgIXCqK831+AbprGca0MVRu0uXR4ryiBXi683LqTHUSspI/brjabAnIgvw7LM 6j0YtRHKfwonm5Chk8b8WtZ9md9gwqxknVXimKdv3nISQiXRVAHfEo/UOnc+tpos HYc6ymQB73BBjvI3O4wUwnIGhVuXL0rgp9zhHNrBI6+kHcY7gb/y7OryPYdxBGvY AXaCG7+xoGDoqpRir0+omd+eyEIZRofNaT+HRp9/nXdBCXGsK7YBYYR0Z1qgox8E 7vhRvUgE/dLlC/PHcEqs2KNSOFzrMvUahDTMbmDkDTFCvm54PNZoLpuQfP9zL1rd BWK1weDTk1KZUw+h4Bt56bY3odw0hhgoYYKabgslMsF4FwvMi7O6AJ08WIu50l0h 6BJpJyS5A8SZCnoGhToYv8A8KJzwWRU5szU8hEl9P1w1InZ3Eb7KWj8PIyJ5LSdX Q38rSnLFBUOro9i89pRkpIHDKzgCq5FaRJsDPOxQHHByy8az6vdcgrcSd5/RNMN3 H1m6ADq8MD21yIi+k8T4vZVtDMmqNLxDw7zkqZ8P3Dc28LNkVFsqvhZqJ6y20qmg ak+LNaaUOncRBqXV1o1S =SD/6 -----END PGP SIGNATURE-----
Posted on Leave a comment

Microsoft’s Redmond campus modernization update: Demolition begins

Stack of white hardhats bearing the Microsoft logo

Today marks the next milestone in Microsoft’s campus modernization effort. Deconstruction is beginning, and buildings will start coming down.

When the project is complete, the new campus will provide a modern workplace and create greater collaboration and community. To commemorate the original buildings, the company offered an exclusive opportunity for a group of employees to say goodbye to the original campus with a demolition party to kick off the destruction. On Tuesday, one employee and nine of his teammates (who collectively donated money to charity to win the experience via the Employee Giving Campaign auction) took to the company’s first buildings equipped with hard hats, sledgehammers and “the claw.” Check out some highlights from the fun below:

“It is great to see the interest and excitement from employees for the campus modernization,” said Michael Ford, Microsoft general manager of global real estate and security. “Our employees are crucial to building an exceptional place to work, and this event was a great way to kick off this journey together.”

Moving forward

Over the next few months, Microsoft will continue the decommissioning and demolition of 12 buildings, embracing sustainable practices throughout the process.

In 2016, Microsoft became the first technology company in the U.S. to be certified Zero Waste for diverting at least 90 percent of its waste from the landfill. The company’s goal with this project is to remain in line with this certification for construction materials and divert a majority of building materials from the landfill. This means focusing on reusing, donating and recycling. From concrete and steel framing to carpets, ceiling tiles, electronic and networking gear, interior debris and loose assets like furniture, chairs and whiteboards, to even the artificial turf outside — most of the materials in the old spaces will find a new life.

“We strive to make a positive impact on the community,” Ford said. “We’re putting a lot of effort behind finding innovative ways to reduce our impact and optimize our resource usage.”

Beyond what is being recycled, the company is also considering where materials will be processed. To maximize sustainability, Microsoft’s construction team is engaging with local waste processing and recycling companies to study and prioritize the hauling distances to further shrink the project’s construction carbon footprint.

“Corporate and environmental responsibility are equally as important as budget and schedule — and we are aligning our design and construction practices with Microsoft’s global corporate responsibility and sustainability missions,” Ford said. “It feels good to know that here in our hometown we’re supporting this vision.”

Follow updates and developments as this project progresses on Microsoft’s Modern Campus site.